NEW
Font size
WorksheetsDFT4027 QUIZ 3 - Topic 4 (CLO1)
Total questions: 10
Worksheet time: 3hrs 30mins
Identify the CORRECT meaning of abstract method.
Method without body
Regular method with body
Method which can only be implemented
Method which can only be accessed by abstract class
An abstract class and a normal class BOTH can have abstract methods in it. True or false?
TRUE
FALSE
We can create object from an abstract class with new keyword.
TRUE
FALSE
Identify which type of inheritance abstract class represent to?
Single
Multiple
Multilevel
Multitrading
Identify the correct keyword to inherits an abstract class to a normal class.
extends
implements
super
this
A class Animal has a method sound() and the sub-classes of Dog, Lion and Cat.
Since the animal sound differs from one animal to another, there is no point to implement this method in parent class.
So, identify how method is declared to implement the same sound() method in subclass to describe different sound.
Create normal class with abstract method sound()
Create abstract class with normal method sound()
Create abstract class with abstract method sound()
Create normal class with normal method sound()
A subclass from an abstract class MUST IMPLEMENT all superclass method.
YES
TRUE
You cannot create object from an abstract class.
TRUE
FALSE
abstract class Animal
class Cat extends class Animal
class Dog extends class Animal
class Lion extends class Animal
Identify the concrete class from the above declaration.
Animal
Cat only
Cat, Dog and Lion
Non of the above
The class which is extending abstract class must overload all the abstract methods.
TRUE
FALSE
