Java Reference
In-Depth Information
Jack Johnson 85 83 77 91 76
Lisa Aniston 80 90 95 93 48
Andy Cooper 78 81 11 90 73
Ravi Gupta 92 83 30 69 87
Bonny Blair 23 45 96 38 59
Danny Clark 60 85 45 39 67
Samantha Kennedy 77 31 52 74 83
Robin Bronson 93 94 89 77 97
Sheila Sunny 79 85 28 93 82
Kiran Smith 85 72 49 75 63
Use an array of objects of the class Tests (designed in part (a)) to store each
student's data. The program should output data as close as possible to the following
form:
First_Name
Last_Name
Test1
Test2
Test3
Test4
Test5
Average Grade
Jack
Johnson
85.00
83.00
77.00
91.00
76.00
82.40
B
Lisa
Aniston
80.00
90.00
95.00
93.00
48.00
81.20
B
Andy
Cooper
78.00
81.00
11.00
90.00
73.00
66.60
D
Ravi
Gupta
92.00
83.00
30.00
69.00
87.00
72.20
C
Bonny
Blair
23.00
45.00
96.00
38.00
59.00
52.20
F
Danny
Clark
60.00
85.00
45.00
39.00
67.00
59.20
F
Samantha
Kennedy
77.00
31.00
52.00
74.00
83.00
63.40
D
Robin
Bronson
93.00
94.00
89.00
77.00
97.00
90.00
A
Sheila
Sunny
79.00
85.00
28.00
93.00
82.00
73.40
C
Kiran
Smith
85.00
72.00
49.00
75.00
63.00
68.80
D
Class average = 70.94
9
14. Write a program that uses the class RollDie to roll a pair of dice 1000
times (or 1000 pairs of dice). The program then outputs the pair of numbers
rolled by the dice, the sum of the numbers rolled by each pair of dice, the
number of times each sum is rolled, and the sums that are rolled the
maximum number of times. (Use a two-dimensional array to create 1000
pairs of dice and to store the pairs of numbers rolled by each pair of dice.)
15. Airplane Seating Assignment: Write a program that can be used to
assign seats for a commercial airplane. The airplane has 13 rows, with 6
seats in each row. Rows 1 and 2 are first class, rows 3 to 7 are business class,
and rows 8 to 13 are economy class. Your program prompts the user to
enter the following information:
a. Ticket type (first class, business class, or economy class)
b. Desired seat
Output the seating plan in the following format:
A B C
D E F
Row 1
* * X
* X X
Row 2
* X *
X * X
Row 3
* * X
X * X
Row 4
X * X
* X X
Search WWH ::




Custom Search