Java Reference
In-Depth Information
a. ********** b. * c.********** d. *
********* ** ********* ***
******** *** ******** *****
******* **** ******* *******
****** ***** ****** *********
***** ****** ***** *********
**** ******* **** *******
*** ******** *** *****
** ********* ** ***
* ********** * *
PP 6.8 Design and implement an application that prints a table show-
ing a subset of the Unicode characters and their numeric values.
Print five number/character pairs per line, separated by tab
characters. Print the table for numeric values from 32 (the space
character) to 126 (the ~ character), which corresponds to the
printable ASCII subset of the Unicode character set. Compare
your output to the table in Appendix C. Unlike the table in
Appendix C, the values in your table can increase as they go
across a row.
PP 6.9 Design and implement an application that reads a string from
the user, then determines and prints how many of each lowercase
vowel (a, e, i, o, and u) appear in the entire string. Have a sepa-
rate counter for each vowel. Also count and print the number of
nonvowel characters.
PP 6.10 Design and implement an application that prints the verses of the
song “The Twelve Days of Christmas,” in which each verse adds
one line. The first two verses of the song are:
On the 1st day of Christmas my true love gave to me
A partridge in a pear tree.
On the 2nd day of Christmas my true love gave to me
Two turtle doves, and
A partridge in a pear tree.
Use a switch statement in a loop to control which lines get
printed. Hint: Order the cases carefully and avoid the break
statement. Use a separate switch statement to put the appropri-
ate suffix on the day number (1st, 2nd, 3rd, etc.). The final verse
of the song involves all 12 days, as follows:
On the 12th day of Christmas, my true love gave to me
Twelve drummers drumming,
Eleven pipers piping,
Search WWH ::




Custom Search