Home Segments Top Top Previous Next

582: Practice

Write a method, readScoreVector, that records baseball-game scores in a vector. You are to obtain the scores from a file, as specified in Segment 502. Each vector element is to be an instance of a class named Game, which you are to define as well. Use instance variables to hold your team's score and the opponent team's score.