+1-415-315-9853

info@mywordsolution.com

## Engineering

 Civil Engineering Chemical Engineering Electrical & Electronics Mechanical Engineering Computer Engineering Engineering Mathematics MATLAB Other Engineering Digital Electronics Biochemical & Biotechnology

Future Value of Periodic Savings:

Figuring Out How Much a "Holiday Club" Account Will Contain in the Future:

Note: No use of global variables is permitted in this program. In another words, all variables should be declared inside main or another function.

OBJECTIVE: Practice top-down design, the use of the data type double in mathematical functions, and suitable formatting of the output of double values.

THE ASSIGNMENT: prepare a program which computes the future value of a 'Holiday Club' account.

The idea is that every week, on Friday, a person deposits P dollars into a special savings account. The weekly deposit is always the same: P dollars. Before the first deposit is made, there is no money in the account. Whatever money is in the account earns interest at some specific fixed rate, compounded weekly. As the weeks go by, there is more and more money in the account, and so every week the amount of additional interest is larger and larger. Finally the time arrives for purchasing holiday gifts. One Friday, rather than depositing another payment, the owner of the account withdraws all the money and spends it.

Naturally, people want to know the answers to problems similar to this: "If I put \$30.00 in the Holiday Club account per week for 50 weeks, and if the annual interest rate is 9.73%, then how much will be in the account when I withdraw all the money?" This program will answer such problems.

PROGRAM INPUT AND OUTPUT:

The program should start by writing information to describe the purpose of the program, and a general explanation of how to use the program.

The program should then prompt for and input the following three items (in the following order): the amount of the weekly payment, the annual interest rate, and the number of weekly payments. It should print individual prompts for each of the three quantities.

The payment amount should be entered as a fixed-point decimal, denoting dollars and cents, without a dollar sign or commas, by using the decimal point in the standard manner when the amount is not a whole number of dollars. For illustration : the user enters 34.56 to mean 34 dollars and 56 cents, or 100 to mean 100 dollars. The prompt you make for the payment must make such rules clear to the user of the program.

The interest rate should be entered as a fixed-point decimal number of percentage points. For illustration: the user enters 8.125 to mean an annual interest rate of 8.125%. The prompt you create for the interest should make this rule clear to the user of the program.

The number of weekly payments should be entered as a positive integer. For illustration: the user enters 45 to mean forty-five weekly payments. The prompt you create for the number of weekly payments must make this rule clear to the user of the program.

Make sure to prepare the program so that it inputs only:

a) The amount of the payment,
b) The interest rate, and
c) The number of payments,

in that order. If I decide I want to test a program I will want to use redirection from prepared files of input. That won't work out unless you and I have this precise agreement on the form (and order) of the input.

After the user enters the input (payment amount P, interest rate R, and number of weekly payments N), the program must find out the amount of money that will be in the account at the end of N weeks (the future value FV) using this formula:

P((r+1)N - 1)(r+1)
FV =   ------------------------
r
where, r = R/5200, the decimal equivalent of the weekly interest rate.

Of course, the formula above is in a format 'to be understood by humans,' and doesn't have JAVA syntax. Part of your job as programmer is to create suitable JAVA expressions to perform the calculations.

Here is an outlandish illustration of a way to use the formula which may make it more understandable: Assume P is \$100 per week, the annual interest rate R is 520% (ten percent per week) and the number of payments N is 2, then r = 520/5200 = 0.10, and

100((1.10)2 - 1)(1.10)
FV =   --------------------------------   =  \$231.00
0.10
Another illustration: if P is \$100, R is 9.25% and N is 50, then r = 9.25/5200 = 0.001779, and

100((1.001779)50   - 1)(1.001779)
FV =   --------------------------------   =  \$5233.57
0.001779
Note that your program can use the pow function to compute the power: (r + 1)N

For ex pow(3,2) is 3 to the 2nd power (= 9) and pow(2,5) is 2 two to the fifth power (= 32).

After computing it, the program must prepare a message to standard output (the screen) saying what the future value is. The message must also tell what the input of the user was. For ex, if the user enters 100 for the amount of the payment, 9.25 as the interest rate, and 50 as the number of weeks, then your program should output something very much like this:

The future value of 50 weekly payments of:

\$100.00 at 9.250% is \$5233.57.

Your program is required to format the numbers for output as shown above.The money should always appear in fixed-point notation, preceded by a dollar sign, and with exactly two digitsdisplayed after the decimal point. The interest rate must be displayed in fixed-point notation, as a percentage, with exactly three digits displayed after decimal point.

Computer Engineering, Engineering

• Category:- Computer Engineering
• Reference No.:- M91335

Have any Question?

## Related Questions in Computer Engineering

### Using notepad write a program using pseudocode to solve

Using Notepad++ , write a program using Pseudocode to solve the following problem. Use the modular approach to solving the problem. Determine the median selling price of all homes in a subdivision named Botany Bay sold d ...

### 1 implement a text-based version of the reversi game using

1. Implement a text-based version of the Reversi game using your game logic ADT from the previous question. 2. Define a game logic ADT, similar to that of the Reversi Game Logic ADT, for the game of checkers.

### Discuss the type of person you consider yourself to be in a

Discuss the type of person you consider yourself to be in a team (from team roles), moreover discuss about special situation that you have had come across in a team and how you had manage the given situation.

### 1 what is a honeypot how is it different from a honeynet2

1. What is a honeypot? How is it different from a honeynet? 2. How does a padded cell system differ from a honeypot? 3. What is network footprinting? What is network fingerprinting? How are they related?

### 1 the as number in an organization is 24101 find the range

1. The AS number in an organization is 24101. Find the range of multicast addresses that the organization can use in the GLOP block. 2. A multicast address for a group is 232.24.60.9. What is its 48-bit Ethernet address ...

### 1 you can read the value instance variable of the counter

1. You can read the value instance variable of the Counter class with the getValue accessor method. Should there be a setValue mutator method to change it? Explain why or why not. 2. a. Show that the BankAccount(double i ...

### Another form of comb filter is given by the transfer

Another form of comb filter is given by the transfer function H(z)=1+ z -L For this problem, let L = 6. (a) Find the filter's impulse response h[n]. (b) Determine a canonical realization of this filter. (c) Find and plot ...

### Identifying purposes and characteristics of

Identifying Purposes and Characteristics of Processors Identifying Purposes and Characteristics of Memory How to Disassembling and Reassembling Laptops. How to Installing and Configuring Expansion Cards What are the diff ...

### Researchnbspavailable accounting software for small medium

Research  available accounting software for small, medium, and large businesses. Create  a 3- to 4-page recommendation and include the following: Matrix listing viable accounting software options for a small, medium, and ...

### 1 assume an object identifier in mib has three simple

1. Assume an object identifier in MIB has three simple variables. If the object identifier is x, what is the identifier of each variable? 2. Can SNMP reference the entire row of a table? In other words, can SNMP retrieve ...

• 13,132 Experts

## Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

### Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

### Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

### Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

### Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

### Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen