subject

Create a class named baseballgame that contains data fields for two team names and scores for each team in each of nine innings.

create get and set methods for each field; the get and set methods for the scores should require a parameter that indicates which inning's score is being assigned or retrieved.

do not allow an inning score to be set if all the previous innings have not already been set.

if a user attempts to set an inning that is not yet available, issue an error message.

also include a method that determines the winner of the game after scores for the last inning have been entered.

save the file as baseballgame. jav

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:30
What are the steps involved in accepting all the changes in a document? arrange these in order click edit. click accept or reject. click changes. click accept all.
Answers: 1
question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
You know the right answer?
Create a class named baseballgame that contains data fields for two team names and scores for each t...
Questions
question
Social Studies, 01.12.2021 21:50
question
Mathematics, 01.12.2021 21:50
Questions on the website: 13722360