Chapter 1 Lab Algorithms, Errors, and Testing
Objectives
Be able to write an algorithm
• Be able to compile a Java program
• Be able to execute a Java program using the Sun JDK or a Java IDE
• Be able to test a program
Be able to debug a program with syntax and logic errors
Introduction
+
Your teacher will introduce your computer lab and the eavironment you will be using
for programming in Java.
In chapter 1 of the textbook, we discuss writing your first program. The example
calculates the user's gross pay. It calculates the gross pay by multiplying the number of
hours worked by hourly pay rate. However, it is not always calculated this way. What
if you work 45 hours in a week? The hours that you worked over 40 hours are consid-
ered overtime. You will need to be paid time and a half for the overtime hours you
worked.
with

Solved
Show answers

Ask an AI advisor a question