Request: Write a program that computes an investment report. Analysis: The inputs to this program are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Request: Write a program that computes an investment report. Analysis: The inputs to this program are the following: ● ● 2 ● The program uses a simplified form of compound interest, in which the interest in computed once each year an added to the total amount invested. The output of the program is a report in tabular form that shows, for each year in the term of the investment, the year number, the initial balance in the account for that year, the interest earned for that year, and the ending balance for that year. The columns of the table are suitably labeled with a header in the first row. Following the output of the table, the program prints the total amount of the investment balance and the total amount of interest earned for the period. The proposed user interface is shown below: 4 5 Enter the investment amount: $ 10000.00 Enter the number of years: 5 Enter the rate as a %: 5 Year An initial amount to be invested (a floating-point number) A period of years (an integer) An interest rate (a percentage expressed as an integer) Starting 10000.00 10500.00 11025.00 11576.25 12155.06 Balance Interest 500.00 525.00 551.00 578.81 607.75 Ending Balance: $ 12762.82 Total Interest Earned: $ 2762.82 Ending Balance. 10500.00 11025.00 11576.25 12155.06 12762.82 The four principal parts of the program perform the following tasks: 1. Receive the user's inputs and initialize data. 2. Display the table's header. 3. Compute the results for each year, and display team as a row in the table. 4. Display the totals. The third part of the program, which computes and displays the results, is a loop. Note that the starting balance refers to the original input balance and also to the balance that begins each year of the term. Ignoring the details of the output at this point allows us to focus on getting the computations correct. Request: Write a program that computes an investment report. Analysis: The inputs to this program are the following: ● ● 2 ● The program uses a simplified form of compound interest, in which the interest in computed once each year an added to the total amount invested. The output of the program is a report in tabular form that shows, for each year in the term of the investment, the year number, the initial balance in the account for that year, the interest earned for that year, and the ending balance for that year. The columns of the table are suitably labeled with a header in the first row. Following the output of the table, the program prints the total amount of the investment balance and the total amount of interest earned for the period. The proposed user interface is shown below: 4 5 Enter the investment amount: $ 10000.00 Enter the number of years: 5 Enter the rate as a %: 5 Year An initial amount to be invested (a floating-point number) A period of years (an integer) An interest rate (a percentage expressed as an integer) Starting 10000.00 10500.00 11025.00 11576.25 12155.06 Balance Interest 500.00 525.00 551.00 578.81 607.75 Ending Balance: $ 12762.82 Total Interest Earned: $ 2762.82 Ending Balance. 10500.00 11025.00 11576.25 12155.06 12762.82 The four principal parts of the program perform the following tasks: 1. Receive the user's inputs and initialize data. 2. Display the table's header. 3. Compute the results for each year, and display team as a row in the table. 4. Display the totals. The third part of the program, which computes and displays the results, is a loop. Note that the starting balance refers to the original input balance and also to the balance that begins each year of the term. Ignoring the details of the output at this point allows us to focus on getting the computations correct.
Expert Answer:
Related Book For
Database Systems A Practical Approach to Design Implementation and Management
ISBN: 978-0132943260
6th Edition Global
Authors: Thomas Connolly, Carolyn Begg
Posted Date:
Students also viewed these programming questions
-
Write a program that simulates stable storage. Use two large fixed-length files on your disk to simulate the two disks.
-
Write a program that computes the spherical distance between two points on the surface of the Earth, given their latitudes and longitudes. This is a useful operation because it tells you how far...
-
Write a program that computes the edit distance (also called the Levenshtein distance, for its creator Vladimir Levenshtein) between two words. The edit distance between two strings is the minimum...
-
Implement a generic Map that supports the put and get operations. The implementation will store a hash table of pairs (key, definition). Figure 5.55 provides the Map specification (minus some...
-
Propulsion Labs will acquire new equipment that falls under the five-year MACRS category. The cost is $200,000. If the equipment is purchased, the following earnings before depreciation and taxes...
-
If one fails to reject the null hypothesis for a single-sample z test, one does/does not need to be concerned about the direction of the difference between the sample mean and the population mean.
-
Alternatives 1, 2, and 3 have lives of 3, 4, and 6 years, respectively. Their net cash flow (NCF) and salvage value (SV) profiles are as follows: Additional explanation is necessary: The NCF profile...
-
The number of internal disk drives (in millions) made at a plant in Taiwan during the past 5 years follows: a) Forecast the number of disk drives to be made next year, using linear regression. b)...
-
Elaborate on why you feel that the chosen concept Tariffs is most important in relation to the wine and spirit industry. How does this affect you as a sales associate working in the wine and spirit...
-
By modern standards, the shaft design of Problem 5-76 is poor because it is so long. Suppose it is redesigned by halving the length dimensions. Using the same material and design factor as in Problem...
-
An axial flow fan has a hub diameter of 1.5 m and a tip diameter of 3 m. It rotates at 250 rpm and handles an airflow rate of 12.5 cubic meters per second. Assume that the velocity of flow is...
-
Resolution Agreement with the University of California at Los Angeles Health System --July 6, 2011 describe the alleged violations (e.g., impermissible disclosure of electronic protected health...
-
The 4S Liner offers a tour package to a group of 30 persons for a price of 300.00 per person but it reduces the price per person by 5.00 for each additional person above 30. What is the maximum...
-
Compare and contrast HIPAA as a healthcare consumer/ healthcare worker with specific legislative requirements.
-
(c) The population of a town in the south of Bangladesh has been growing a rate that is propor- tional to the population with a constant of proportionality 0.03. However, flooding has alarmed...
-
Well desgined Human Resoruce policies can be an effective way to build an effective company union avoidance strategy. Comment on each of these three (3) HR policies as to how they can defend against...
-
Figure 4 shows the smart parking system using PIC microcontroller. As per the diagram, develop the full application with hardware and software logic. Assume a suitable sensor and driving circuit for...
-
What are current assets and current liabilities? How are they different from non-current assets and non-current liabilities?
-
What is a FLWOR expression?
-
Write an algorithm for shared and exclusive locking. How does granularity affect this algorithm?
-
Describe what a super class and a subclass represent.
-
Discuss the main differences between the traditional and the modern finance paradigm in understanding the behavior of individual investors.
-
Discuss the disposition effect and the proposed explanations for this effect.
-
Define and describe the process of worrying within the finance domain.
Study smarter with the SolutionInn App