ITEC 120 Lab Quiz 1 - Wednesday, Jan 28

Lab Quiz 1 - Feet and inches
Submit your program to your directory on neelix .

Ask the user for a number of feet and inches and output the total number of inches. (There are 12 inches in a foot.)

Program outputs: Please enter a number of feet:
User inputs: 5
Program outputs: Please enter a number of inches:
User inputs:

5

Program outputs:

5 feet, 5 inches is 65 inches.

Use good programming style in your program: choose good variable names, and use constants when appropriate (there is one in this program).

Name your program file labquiz1.java. Make sure your name is in the header documentation of your program. Make sure your program compiles and runs before you copy labquiz1.java to a folder called RU02 in your folder on neelix.


Extra Credit:
For 2 points (lab quiz is worth 10 points, so that's an extra 20%) extra credit, do the reverse calculation, convert inches to feet and inches. (see the portions in red in the example below). Simply add this to your program.

Do not attempt the extra credit until you have completed the first, required part of labquiz1. You should submit the first part, then try to complete this part. If you get the extra credit part working, you can submit the file to neelix again, overwriting the first one.

Program outputs: Please enter a number of feet:
User inputs: 5
Program outputs: Please enter a number of inches:
User inputs:

5

Program outputs:

5 feet, 5 inches is 65 inches.

Please enter a number of inches:

User inputs: 73
Program outputs: 73 inches is 6 feet, 1 inches.