ITEC 120 LAB 4 Back to Lab index page

Lab must be completed and reviewed by Peer Instructor on Fri, Jan 23 during lab class. (Wed, Jan 28 is a lab quiz).

Description

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 Wed. 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 the java file you wrote for lab2 (lab2.java) so we can make sure the submission process works for you before you have to turn in your lab quiz (Wed, Jan 28).

PART 2 - Time calculator

Write a program which asks the user for a number of hours, minutes, and seconds, and convert that to a total number of seconds.

Sample run:

Program outputs:

Welcome to the amazing time calculator.
Please enter a number of hours:

User inputs: 4
Program outputs: Please enter a number of minutes:
User inputs: 36
Program outputs: Please enter a number of seconds:
User inputs: 14
Program outputs:

4 hours, 36 minutes and 14 seconds is 16574 seconds.

You'll use the Keyboard class again to read numbers entered by the user. Use 2 contants when you write this program. (What will they be?) How many variables will you need for this program?

Completion Requirements

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