wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DFT4027 QUIZ 3 - Topic 4 (CLO1)

Total questions: 10

Worksheet time: 3hrs 30mins

Name
Class
Date
1.

Identify the CORRECT meaning of abstract method.

a)

Method without body

b)

Regular method with body

c)

Method which can only be implemented

d)

Method which can only be accessed by abstract class

2.

An abstract class and a normal class BOTH can have abstract methods in it. True or false?

a)

TRUE

b)

FALSE

3.

We can create object from an abstract class with new keyword.

a)

TRUE

b)

FALSE

4.

Identify which type of inheritance abstract class represent to?

a)

Single

b)

Multiple

c)

Multilevel

d)

Multitrading

5.

Identify the correct keyword to inherits an abstract class to a normal class.

a)

extends

b)

implements

c)

super

d)

this

6.

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.

a)

Create normal class with abstract method sound()

b)

Create abstract class with normal method sound()

c)

Create abstract class with abstract method sound()

d)

Create normal class with normal method sound()

7.

A subclass from an abstract class MUST IMPLEMENT all superclass method.

a)

YES

b)

TRUE

8.

You cannot create object from an abstract class.

a)

TRUE

b)

FALSE

9.

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.

a)

Animal

b)

Cat only

c)

Cat, Dog and Lion

d)

Non of the above

10.

The class which is extending abstract class must overload all the abstract methods.

a)

TRUE

b)

FALSE