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

1, Which of the following class definitions defines a legal abstract class? clas

ID: 3909934 • Letter: 1

Question

1, Which of the following class definitions defines a legal abstract class?

class A { abstract void unfinished() { } }

class A { abstract void unfinished(); }

abstract class A { abstract void unfinished(); }

public class abstract A { abstract void unfinished(); }

2, Suppose A is an abstract class, B is a concrete subclass of A, and both A and B have a default constructor. Which of the following is correct?

A a = new A();

A a = new B();

B b = new A();

B b = new B();

3, You can create an Integer object from an integer by using the Integer constructor with the int argument.

true

false

4, A subclass of a non-abstract class must be non-abstract.

true

false

Explanation / Answer

1)c)abstract class A { abstract void unfinished(); }

it defines a defines a legal abstract class but the remaining have
not defined as abstract and public class abstract A { abstract void unfinished(); } is not a valid method.

2)A a = new B(); and B b = new B(); are both correct answers you can choose the first one

3)Yes it is true You can create an Integer object from an integer by using the Integer constructor with the int argument.


4)A subclass of a non-abstract class must be non-abstract. it is a false statement because A subclass of a non-abstract class mustnot be non-abstract class.

Thanks have a great day.