Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

1. 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 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!. Save the class as Team.java. /2. Write an application named TestTeam whose main() method declares three Team objects. For each Team object, call a method named setTeamData() that declares a temporary Team object, prompts the user for values for the fields, and returns the temporary object to one of the Teams in the main() method. Display all the data, including the motto, for each Team object. Save the file as TestTeam.java.

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

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions