Write a program that creates two instances of the generic class LinkedList given in Listing 12.12. The
Question:
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.
Step by Step Answer:
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch