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

1. Create a BowlingTeam 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 teamName field.

c. Add a setMember method that sets a team members 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 members name. The method requires a value used as a subscript that determines which members name to return.

2. Create a BowlingTeamDemo class. In the main method include the following:

a. Declare 2 variables: name and a constant NUM_TEAMS that holds 4 Bowling Team objects.

b. Declare and instantiate an array teams of BowlingTeam 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 teams name and their team members.

Output should look like:

Members of team The Lucky Strikes

Carlos

Diego

Rose

Lynn

Members of team I Can't Believe It's Not Gutter

Ricardo

Pam

Cindy

Mike

Members of team Spare Me

Quincy

Olivia

Darlene

Ted

Members of team Lords of the Pins

Linus

Niles

William

Ted

java basic programming course simple as possible use java import and comments to explain the code thanks in advance.

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!