Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need answer of all this question if someone can help me. public class SchoolCl

ID: 3858872 • Letter: I

Question

I need answer of all this question if someone can help me.

public class SchoolClient{

     public static void main (String [ ] args) {

     School school1 = new School ();  

     School school2 = new School ("UMass Lowell");   

     school1.setname ("Middlesex Community College");

     System.out.println (school1.getname());

     System.out.println (school2.getname());

     }

}

school1

b school2

c

school1 & school2

School

2.

Looking at the following client class, how many constructor methods does the School class have? public class SchoolClient{

     public static void main (String [ ] args) {

     School school1 = new School ();

     School school2 = new School ("UMass Lowell");

     school1.setname ("Middlesex Community College");

     System.out.println (school1.getname());

     System.out.println (school2.getname());

     }

}

a 1

b 2

3

d 4

3.

looking at the following client, which of the following method(s) take a parameter in the School class?

public class SchoolClient{

     public static void main (String [ ] args) {

     School school1 = new School ();

     School school2 = new School ("UMass Lowell");

     school1.setname ("Middlesex Community College");

     System.out.println (school1.getname());

     System.out.println (school2.getname());

     }

}

setname

getname

setname and the constructor

setname & getname

a

school1

b school2

c

school1 & school2

D

School

2.

Looking at the following client class, how many constructor methods does the School class have? public class SchoolClient{

     public static void main (String [ ] args) {

     School school1 = new School ();

     School school2 = new School ("UMass Lowell");

     school1.setname ("Middlesex Community College");

     System.out.println (school1.getname());

     System.out.println (school2.getname());

     }

}

a 1

b 2

c

3

d 4

3.

looking at the following client, which of the following method(s) take a parameter in the School class?

public class SchoolClient{

     public static void main (String [ ] args) {

     School school1 = new School ();

     School school2 = new School ("UMass Lowell");

     school1.setname ("Middlesex Community College");

     System.out.println (school1.getname());

     System.out.println (school2.getname());

     }

}

a

setname

b

getname

c

setname and the constructor

d

setname & getname

Explanation / Answer

Dear Student,

here are the answers...

---------------------------------------------------------------------------------------------------------------------------------------

Answer No: 1

NOTE: Question number first problem statement is missing.Kindly state the problem.

---------------------------------------------------------------------------------------------------------------------------------------

Answer No:2 Option (b) is correct.

There are two constructor methods which the School class have?

1: Default Constructor

Ex: School school1 = new School ();

2: Parameterized Constructor

Ex: School school2 = new School ("UMass Lowell");

Hence option (b) is correct.

------------------------------------------------------------------------------------------------------------------------------------------

Answer No:3 Option C is correct.

School school2 = new School ("UMass Lowell");           (This is the Constructor)

school1.setname ("Middlesex Community College");    (This is the setname method)

SO the above two methods takes the parameters.

hence option C is correct.

-----------------------------------------------------------------------------------------------------------------------------------------

Kindly Check and Verify Thanks...!!!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote