#Multiple Choice homework problem

16 messages · Page 1 of 1 (latest)

prime cairn
#

I spent hours searching the web and trying to understand this : D

Which of the following statements about abstract class are true? (Choose all that apply)
-Abstract class is a hybrid of concrete class and abstract interfaces.
-Abstract class can be initiated itself.
-Abstract class cannot have attributes.
-Abstract method is only allowed to be in abstract class.
-Abstract method must be implemented.
-Abstract class can extend from a superclass and implement multiple interfaces.

covert kestrelBOT
#

This post has been reserved for your question.

Hey @prime cairn! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

stiff halo
#

2 3 are wrong, 4 5 6 are right

#

And 1 is wrong

#

Hope it will help you

prime cairn
#

Oh i thought an abstract method doesn't need to be implemented in abstract class itself since its only job of the subclasses is to implement it

stiff halo
#

Finally,it has to be implement to be used

#

Otherwise,there is no meaning to create this abstract method

prime cairn
#

ohhhh

#

thanks sm

covert kestrelBOT
# prime cairn thanks sm

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.

prime cairn
#

also I said 1, 4, and 5 are correct here:

Which statements about polymorphism and method inheritance are correct? (Choose all that apply)

  • It cannot be determined until runtime which overridden method will be executed in a parent class.
    -It cannot be determined until runtime which hidden method will be executed in a par- ent class.
    -Marking a method static prevents it from being overridden or hidden.
    -Marking a method final prevents it from being overridden or hidden.
    -The reference type of the variable determines which overridden method will be called at runtime.
    -The reference type of the variable determines which hidden method will be called at runtime.
#

I think that's correct

stiff halo
#

If you wanna see the answer after you finished,you can use chatgpt,and in addition you can let it explain to you.