Read the lab requests and fix my mistakes

profiledqztmq2r
lab5.doc

Cmpsc121 Lab Assignment #5

Fall 2012

Assignments:

1. Add a manual selection that interfaces with the user to your program. Add a user selection menu at the beginning of your program. You can use either switch or if else if statement to do so.

2. The user interface:

Enter your name: Tom Waits (example)

Hello Tom Waits, please select the service:

A: Investment projection

B: Retirement planning

C: Mortgage

D: College fund

E: Exit

If user select A, execute your lab 3 program.

If the user select D, output “ service coming soon.”

If the user select E, output “Thank you.”

If the user select anything else, output “Invalid selection.”

3. Check to make sure that the user is input ONLY ABCDE or abcde

4. When the user finish transaction, prompt the user for another transaction, if the user enter N, end with “Have a nice day.”

5. Under (C), load a text file called “loan.txt” which has the following info

Principle:

Interest rate:

Loan term:

Calculated the following and output:

Hello Tom Waits:

Principle:

Interest rate:

Loan term:

Monthly mortgage is:

Would you like to go back to Menu? (Y/N)

(both Y or y, N or n are accepted.)

6. Under C, design a function called : After taking the inputs, call a function mort() to process the calculations.

7. Go to the following linked for math calculation, and design your program based on these information. Make sure you understand the information before you proceed.

https://www.nerdwallet.com/blog/finance/mortgage/faq/calculate-monthly-mortgage-payment/

http://www.wikihow.com/Calculate-Mortgage-Payments

Lab Deliverables:

1.upload your source code (.cpp file) onto Angel before the due date.

* 1. Name your project as Coursenumber_Lab#_LastName.cpp. Upload your .cpp file in the drop box.

2.Attach your .cpp file and your output file..

Maximum points can be taken:

User name incorrect: -3

Input validation: -6

User prompt statement missing -6

Math calculation -10

Output file format and alignment: -5

Not using proper function call: -15

Not following submission format -5