Lab 12 - March 6

 

To receive credit for this lab assignment, you must be finished by Friday, March 7, at 10:00 p.m. (note extended deadline!)  After this time you will not receive any credit.

 

Instructions:

1.  Login to UNIX, and write a program to do the following:

It is a similar program to that from the first midterm. It is simpler.

Read type of plan for car purchase, it can be A, B or C (String)
Read car price (double). The car price should be at least $77.00
For each one of the payments you should calculate the total price
after adding the interest and the monthly payments.

Plan A: The time to pay the car is one year and the interest is 10%.
Plan B: The time to pay the car is three year and the interest is 25%.
Plan C: The time to pay the car is five year and the interest is 32%.

You must validate that the plan chosen is either A, B or C.
You must validate that the car price is a number (double)
You must validate that the car price is a valid number. This means, no
negative numbers and no price less than $77.

2.  Send an e-mail in Pine and attach your program to the e-mail.  Send to the ics111-lab@hawaii.edu account.  Make sure the subject is 'lab 12'.

3.  Check the webpage to make sure that the e-mail arrived.  Here is the URL:

4.  Once I (TA) get the e-mail in my account AND I can verify it on the web, you will receive your lab participation point.

 

Link to the Java API -  to look up any methods of any class you would like to use.