GamesWon - / Write a Java application called GamesWon.java....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// Write a Java application called GamesWon.java. // //The result of a hockey game between two teams is given as one line of input. An example result for a hockey game is: // //TOR BOS 1 3 // //The two team names are given first (with one or more spaces between the names), followed by one or more spaces, followed by the number of goals each team scored (with one or more spaces //between the number of goals). //In the example, TOR scored 1 goal and BOS scored 3 goals, so BOS won the game and TOR lost the game. You may assume that there is always a winner for each game (there are no games where //the number of goals scored is the same for each team). // //Your program should prompt the user to enter a sequence of hockey game results (one game per line of input) until the user enters the string "done" as a result. //Your program should then output the teams sorted in dictionary order along with the number of games each team won. Use 10 spaces to print the team name, followed by 1 space, and 3 spaces
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/16/2011 for the course CSE CSE 1020 taught by Professor Burton,ma during the Fall '10 term at York University.

Page1 / 2

GamesWon - / Write a Java application called GamesWon.java....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online