Company's income and expense amounts
This is an individual assignment to be done by each student.
Here is the problem specification:
The sales manager at MyStore wants a program that allows her to enter the company's income and expense amounts, which always will be integers. The number of income and expense amounts may vary each time the program is run. For example, the sales manager may need to enter five income amounts and three expense amounts. Or, she may need to enter 20 income amounts and 30 expense amounts. The program should calculate and display the company's total income, total expenses, and profit (or loss).
- Create an IPO chart. List the input, processing, and output items.
- Plan the algorithm using pseudocode.
- Save it in a filename LastFirst_a7.doc (e.g. DoeJohn_a7.doc)
- Enter your C++ instructions into a source file named LastFirst_a7.cpp (e.g. DoeJohn_a7.cpp). Include your name and comments in the program.
- Compile and run the program.
- Take a screen shot of the output. Append it in LastFirst_a7.doc.
Assignment 8: Box Office
This is an individual assignment to be done by each student.
Here is the problem specification:
At the beginning of every year, Paul receives a raise on his previous year's salary. He wants a program that calculates and displays the amount of his annual raises for the next three years, using rates of 3%, 4%, 5%, and 6%. The program should end when Paul enters a sentinel value as the salary.
Sample run:
Salary (negative number or 0 to end): 100
Raise rate: 3%
Year 1: Raise: $3.00
Year 2: Raise: $3.09
Year 3: Raise: $3.18
Raise rate: 4%
Year 1: Raise: $4.00
Year 2: Raise: $4.16
Year 3: Raise: $4.33
Raise rate: 5%
Year 1: Raise: $5.00
Year 2: Raise: $5.25
Year 3: Raise: $5.51
Raise rate: 6%
Year 1: Raise: $6.00
Year 2: Raise: $6.36
Year 3: Raise: $6.74
- Create an IPO chart. List the input, processing, and output items.
- Plan the algorithm using pseudocode.
- Save it in a filename LastFirst_a8.doc (e.g. DoeJohn_a8.doc)
- Enter your C++ instructions into a source file named LastFirst_a7.cpp (e.g. DoeJohn_a8.cpp). Include your name and comments in the program.
- Compile and run the program.
- Take a screen shot of the output. Append it in LastFirst_a8.doc.
Assignment 9: Payroll Code
This is an individual assignment to be done by each student.
Here is the problem specification:
Copy the following data and paste them in a file named Payroll.txt (code#salary).
1#23400
4#17000
5#21000
6#12600
9#26700
10#18900
11#18500
13#12000
15#49000
16#56500
20#65000
21#65500
22#78200
23#71000
24#71100
25#72000
30#83000
31#84000
32#90000
Write a program that allows the user to enter a payroll code. The program should search for the payroll code in the file and then display the appropriate salary. If the payroll code is not in the file, the program should display an appropriate message. Use a sentinel value to end the program.
- Create an IPO chart. List the input, processing, and output items.
- Plan the algorithm using pseudocode.
- Save it in a filename LastFirst_a9.doc (e.g. DoeJohn_a9.doc)
- Enter your C++ instructions into a source file named LastFirst_a9.cpp (e.g. DoeJohn_a9.cpp). Include your name and comments in the program.
- Compile and run the program.
- Take a screen shot of the output. Append it in LastFirst_a9.doc.
- Submit LastFirst_a9.cpp and LastFirst_a9.doc by uploading them here.