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...
-
If a flight mechanic drops a box of tools from a high-flying jumbo jet, it crashes to Earth. In 2008 an astronaut on the orbiting space shuttle accidentally dropped a box of tools. Why did the tools...
-
Find the acute angle between the planes. Round to the nearest thousandth of a radian. -9x-7y-3z = - 3 and 7x+ 10y-3z=2 O A. 1.442 B. 1.557 C. 0.580 OD. 0.991
-
The stockholders' equity LOS, 6,8 accounts of Cooper Corporation at January 1 follow: During the year, the following transactions occurred: Jan. 5 Issued 20,000 shares of common stock for \(\$ 15\)...
-
Mercury Athletics manufactures sporting goods that are then sold to retailers. It is a very competitive industry where quality and price are important to gain space on retailers shelves. Mercurys...
-
The police should automatically be called to the bar if staff are dealing with a Ocustomer who tries to enter the licensed establishment with invalid identification Opatron who repeatedly asks how...
-
1. Is Jones correct? That is, using the more complete data set, is it true that Jones has the lowest defect rate overall? Are Joness percentages correct overall (i.e., combining domestic and overseas...
-
Identify possible obstacles and develop contingency plans: Identify the impact of future developments on existing systems, processes and organisational procedures to enhance the logistics planning...
-
A bookstore is putting together a gift basket of 14 books for a silent auction prize.They would like to include 10 fiction books and 4 non-fiction books from the best-seller list.Right now, there are...
-
We have learned what corrections is, along with the important role it plays in the overall criminal justice system from the historical aspect to present. Over time, just like other areas of the...
-
Given the four mental states, purposely, knowingly, recklessly, and negligently. What examples of what kind of evidence could be used to prove each mental state?
-
Develop an Elixir program that performs real-time data aggregation from multiple sources. Write an Elixir function that implements the quicksort algorithm. Create a chat server in Elixir using the...
-
3 Dexter Industries purchased packaging equipment on January 8 for $90,000. The equipment was expected to have a useful life of years, or 18,000 operating hours, and a residual value of $3,600. The...
-
Becky's company is considering an investment project. To start, Becky just needs to purchase an equipment priced at $5500. The equipment will follow a straight-line depreciation over 10 years. The...
-
Sundial Technologies produces and sells customized network systems in New Brunswick. The company offers a 60-day, all software and labor-and an extra 90-day, parts-only- warranty on all of its...
-
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.
-
Thornhill Company's income statement shows gross profit of \(\$ 432,000\), cost of goods sold of \(\$ 638,000\), and other expenses totaling \(\$ 390,000\). Compute the amounts of (a) revenue from...
-
Which of the following is not considered in determining contribution to common expenses? a. Income taxes b. Cost of goods sold c. Traceable expenses d. Netsales
-
The manager of which of the following segments of a business is responsible for revenue generation as well as for cost and expense control? a. Cost center b. Accounting department c. Profit center d....
Study smarter with the SolutionInn App