ITEC 120 LAB 4 Back to Lab index page

This lab is made up of 2 completely different parts. First, you will electronically submit a file the same way you will submit your lab quiz next Fri. Then, you'll write a program for lab4.

PART 1 - Submit a file electronically - Do this in the first 30 minutes of the lab!!!

In order to turn in lab quizzes and programming assignments, you'll put the necessary files in a folder on neelix. Turn in any java file so we can make sure the submission process works for you before you have to turn in your lab quiz (Fri, Jan 28).

PART 2 - Donut sales calculator

Delicious SugarBomb donuts are 65 cents each. Write a program which asks the user how many donuts they would like to buy and tells the user the total cost of the donuts in dollars and cents. Be sure your program displays the dollars just like this example:

Sample run:
Program displays:

Delicious SugarBomb donuts are 65 cents each!
How many would you like?

User enters: 7
Program displays: 7 donuts cost 4 dollars and 55 cents.

You'll use the Scanner class again to read the number entered by the user. (Look at lab 3)
Use a contant when you write this program. (What should it be called?)
How many variables will you need for this program? What should they be called?

Completion Requirements

Once you've completed the lab, you should show the Peer Instructor: