COMP 110-003 Spring 2013

Lab 1

25 points

Assigned: Thursday, January 19
Due: Thursday, January 24


In Eclipse, create a New Java Project called lab1

Part 1

On the course webpage you will find Copy and paste the program into a new Java class in Eclipse (in project lab1). Run (green circle with white arrow in it) Don't forget to change the header at the top of the program to say your name. In the textbook on page 74 (67 for 5th Ed) you will find pseudocode for Read through the pseudocode (Read pages 74-77 (67-70 for 5th ED)) and make sure you understand the algorithm. Place each line of pseudocode into as comments directly above the line or lines that complete the action. The first line of pseudocode is already in the code as a comment. You may abbreviate the pseudocode comments when you place them into the code.

Part 2

On the course webpage you will find You need to complete this program so that it calculates the total cost of a new coat including tax. (The user will input the cost of the coat and the tax rate.) Write pseudocode for how you would solve this problem. Following your pseudocode, complete the program Just like Part 1 insert your pseudocode as comments into your program.
NOTE: you are dealing with money so you should declare your variables as double, a number with decimal points, instead of int, whole numbers. Also, when reading doubles from the keyboard you would write keyboard.nextDouble() instead of keyboard.nextInt().

Additional Questions



How to hand in the assignment