Search Header Logo

Quiz 7 Object Oriented Programming (Polymorphism, Abstract Classes and Interfaces)

Authored by Sithy Chamroeun

others

Used 5+ times

Quiz 7 Object Oriented Programming (Polymorphism, Abstract Classes and Interfaces)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is polymorphism in Dart?

A) The ability of a class to have multiple constructors
B) The ability of a method to have different implementations in subclasses
C) A way to prevent inheritance
D) The ability to store multiple values in a variable

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is method overriding in Dart?

A) A way to call a superclass method from a subclass
B) When a subclass provides a new implementation of a method from the superclass
C) Using multiple constructors in a class
D) A method that calls itself

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which keyword is used to override a method in Dart?

A) implements
B) override
C) extends
D) final

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following is NOT true about polymorphism?

A) It allows a subclass to override methods of the superclass
B) It makes the code more flexible and reusable
C) It prevents subclasses from modifying the superclass methods
D) It helps in achieving dynamic method dispatch

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is an abstract class in Dart?

A) A class that cannot be instantiated and is used to define a blueprint for other classes
B) A class that allows multiple inheritance
C) A class that can be instantiated directly
D) A class that only contains private variables

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which keyword is used to define an abstract class in Dart?

A) class
B) interface
C) abstract
D) implements

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which statement about abstract classes is true?

A) Abstract classes must have at least one method implementation
B) Abstract classes cannot have implemented methods
C) You can create an object of an abstract class directly
D) Abstract classes are used when we need partial implementation of functionality

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?