Question: 1) Create a BasketballTeam class a. The class has 2 fields: a field for the team name and an array that holds the team members

 1) Create a BasketballTeam class a. The class has 2 fields:

1) Create a BasketballTeam class a. The class has 2 fields: a field for the team name and an array that holds the team members names. b. Create get and set methods for the nameOfTeam field. c. Add a setMember method that sets a team member's name. The method requires a position and a name, and it uses the position as a subscript to the members array d. Add a getMember method that returns a team member's name. The method requires a value used as a subscript that determines which member's name to return. 2) Create a BasketballTeamDemo class. In the main method include the following: a. Declare 2 variables: name and a constant AMO_TEAMS that holds 4 Basketball Team objects. b. Declare and instantiate an array teams of BasketballTeam objects. c. Using nested for loops, prompt the user to enter the 4 team names and enter the team members names. d. Using another nested for loop, output each team's name and their team members'. Output should look like this Members of team The Three Pointers Jakob Margie Emir Don Members f team That are horrible Nikita Levi Riyad Nasiz Members of team Who don' t want to play Marina Ianis Ayla Huma Membe rsf team Who are amazing overall Lebron Jordan Kobe Dwyane

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!