Java Reference
In-Depth Information
1 - 10 | *****
11 - 20 | **
21 - 30 | *******************
31 - 40 |
41 - 50 | ***
51 - 60 | ********
61 - 70 | **
71 - 80 | *****
81 - 90 | *******
91 - 100 | *********
PP 8.4
The lines in the histogram in PP 8.3 will be too long if a large
number of values is entered. Modify the program so that it
prints an asterisk for every five values in each category. Ignore
leftovers. For example, if a category had 17 values, print three
asterisks in that row. If a category had 4 values, do not print any
asterisks in that row.
VideoNote
Developing a solution
of PP 8.5.
PP 8.5
Design and implement an application that computes and prints
the mean and standard deviation of a list of integers x1 through
xn. Assume that there will be no more than 50 input values.
Compute both the mean and standard deviation as floating point
values, using the following formulas.
n
X i
a
i
5
1
mean
5
n
n
1 1
2
2
sd
5 Å a
X i
2
mean
i
5
PP 8.6
The L&L Bank can handle up to 30 customers who have sav-
ings accounts. Design and implement a program that manages the
accounts. Keep track of key information and allow each customer to
make deposits and withdrawals. Produce appropriate error messages
for invalid transactions. Hint : you may want to base your accounts
on the Account class from Chapter 4. Also provide a method to add
3 percent interest to all accounts whenever the method is invoked.
 
Search WWH ::




Custom Search