Write a program that creates two instances of the generic class LinkedList given in Listing 12.12. The first instance is stadiumNames and will hold items of type String. The second instance is gameRevenue and will hold items of type Double. Within a loop, read data for the ball games played during a season. The data for a game consists of a stadium name and the amount of money made for that game. Add the game data to stadiumNames and gameRevenue. Since more than one game could be played at a particular stadium, stadiumNames might have duplicate entries. After reading the data for all of the games, read a stadium name and display the total amount of money made for all the games at that stadium.

What will be an ideal response?


See the code in Revenue.java.

Computer Science & Information Technology

You might also like to view...

Which of the following computers can be configured to perform the work of server?

A. mainframe B. personal computer C. supercomputer D. all of the above

Computer Science & Information Technology

The .swf file is the file you edit when you want to make changes to a Flash movie.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A ________ program gathers usernames, passwords, or credit card numbers when they are entered into a computer

A) bot B) keylogger C) rootkit D) computer zombie

Computer Science & Information Technology

To prevent possible problems in creating a dynamic Web site for a database, you should avoid using ________ in the table and field names

A) spaces B) uppercase characters C) underscores D) lowercase characters

Computer Science & Information Technology