Question: java solve a. Define a class and name it as ICPCCoach. Add the following inside the class. i. Declare 3 instance variables name, country, teamCount

 java solve a. Define a class and name it as "ICPCCoach".

java solve

a. Define a class and name it as "ICPCCoach". Add the following inside the class. i. Declare 3 instance variables name, country, teamCount ii. Add a parameterized constructor which will take 3 parameters. Inside the constructor initializes the attributes with the parameters passed to the constructor. iii. Add the following methods. a. public void promoteTeam(String teamName) - Inside the method, increase the team Count by 1 and print "teamName under name has been promoted for Final contest." Here teamName is the value of the parameter passed to the method whereas team Count and name are the values of respective attributes. b. public int getTeamCount() - the method should return the teamCount attribute. c. public void display0 - inside the method, print the values of all three attributes. b. Define a class and name it as "ICPCContest". Declare the main method inside the class. Inside the main, do the following. i. Create an object of ICPCCoach class with name= your name, country = "Bangladesh", and teamCount =2. Store the reference of the object to coach variable. ii. Call the promoteTeam (...) method using the coach variable and pass "UAP Fighter" as the parameter of the method. iii. Call the display() method using the coach variable. - What is the output of this method

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!