(g) A class called Team includes the following declarations: public class Team { private final int MAX_PLAYERS; priva

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

(g) A class called Team includes the following declarations: public class Team { private final int MAX_PLAYERS; priva

Post by correctanswer »

(g) A class called
Team includes the following declarations:
public class Team
{
private final int
MAX_PLAYERS; private Player[]
players; private int numOfPlayers; //number of players
in the array private String name;
(ii) Write a zero argument
constructor for the class Team, which will initialize MAX_PLAYERS
to 11, create the players array with an appropriate capacity,
initialize numOfPlayers to 0 and set name to the empty
string.
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply