Question: Write a Java class that implements the concept of a sports team (SportsTeam class) that has the following components: Attributes: Mascot, City, Wins, and Losses

 Write a Java class that implements the concept of a sports

Write a Java class that implements the concept of a sports team (SportsTeam class) that has the following components: Attributes: Mascot, City, Wins, and Losses Constructor that initializes Mascot and City attributes. Getter and Setter methods are required for all four attributes. Inside a test class (TestSportsTeam), do the following: Create an array of 4 sports team objects with the following arrangement of objects: object team I: Mascot = "Falcons", City=" Atlanta" object team2:Mascot ="Bucs", City='Tampa Bay"; Mascot ="Saints", City="New Orleans" Mascot ="Panthers", City="Carolina" For each object, randomly assign a value (no greater than 16) to attribute Wins. Then set the Losses attribute to be equal to 16 - Wins. Next, display a header with the following format (City Mascot Wins Losses WinPct) as shown below. Below the header, display (printout) the team that has the most wins and the fewest wins. Compute the win points as follows: WinPct = Wins/(Wins+Losses). Sample output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!