Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming 1 a. Create a class to hold data about a high school sports team. The Team class holds data fields for high school

Java Programming 1

a. Create a class to hold data about a high school sports team. The Team class holds data fields for high school name (such as Roosevelt High), sport (such as Girls Basketball), and team name (such as Dolphins). Include a constructor that takes parameters for each field, and include get methods that return the values of the fields. Also include a public final static String named MOTTO and initialize it to Sportsmanship!. Write an application named TestTeam to instantiate three Team objects with different values, and then display all the data, including the motto, for each object. Save both the Team.java and TestTeam.java files.

b. Create a class named Game. Include two Team fields that hold data about the teams participating in the game. Also include a field for game time (for example, 7 PM). Include a constructor that takes parameters for two Team objects and a time. Write an application named TestGame to instantiate a Game object, then pass the Game to a method that displays the details about the Game.

Hint: Don't forget about the 'this' keyword.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago