Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

📝 Knowledge Test

/
Knowledge Test Score Board
· 0%

Work through the questions below — your score updates as you go.

Keep going · grade bands mapped to DCU's honours scale

target15:00

Only your first attempt at each question counts toward this score. Reload the page to reset.

This section contains 20 interactive knowledge checks designed to test your understanding of the materials covered in Chapter 1. The questions start with foundational concepts and gradually progress to more advanced scenarios. Take your time to think through each question.

Good luck!

Derek.


Q1
Quiz
Select 0/1

What is the primary way that Object-Oriented Programming (OOP) helps in managing software complexity?

By allowing developers to write everything in a single, procedural script.
By eliminating the need for variables and states.
By modelling software components after real-world entities using abstraction and encapsulation.
By automatically increasing the execution speed of the hardware.
Q2
Concept Match

Match the OOP Principle to its Definition

Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.

Encapsulation
drag a definition here…
Inheritance
drag a definition here…
Polymorphism
drag a definition here…
Abstraction
drag a definition here…

Definition Pool

A mechanism allowing a new class to inherit properties and behaviours from an existing class.
Simplifying complex systems by focusing on essential characteristics while hiding implementation details.
Bundling data and methods into a single unit and controlling access to the internal state.
The ability of a single interface to represent different underlying forms or behaviours.
Q3
Quiz
Select 0/1

Which of the following best describes the difference between a Class and an Object?

There is no difference; the terms are used interchangeably in C++.
An Object is a blueprint, while a Class is a specific instance of that blueprint.
A Class is a description or blueprint, whereas an Object is a physical or logical realisation (instance) of that description.
A Class represents the states, while an Object represents the methods.
Q4
Concept Match

Match the Class Component to its Role

Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.

States
drag a definition here…
Methods
drag a definition here…
Interface
drag a definition here…
Implementation
drag a definition here…

Definition Pool

Also known as attributes or data, representing the values held by the object.
The internal, hidden workings of a class, typically using private access modifiers.
The publicly accessible subset of a class's functionality exposed to the user.
Also known as functions or behaviours, delineating actions the object can perform.
Q5
Class Hierarchy

Build a Basic Animal Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree, then click Submit.

Inheritance Tree (base class on top)
·····
·····
·····
·····
·····

Available Classes

Duck
Bark
Beak
Feather
Bird
Dog
Animal
Mammal
Swimming
Q6
Quiz
Select 0/1

Which access modifiers are typically used to implement encapsulation in C++?

static for the interface and dynamic for the internal implementation.
public for the interface and private for the internal implementation.
public for internal workings and private for the interface.
global for the interface and local for the internal implementation.
Q7
Concept Match

Match the UML Concept to its Description

Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.

UML
drag a definition here…
Class Diagram
drag a definition here…
Sequence Diagram
drag a definition here…
Use Case Diagram
drag a definition here…

Definition Pool

Shows how objects interact over time using lifelines and message arrows.
Shows classes, attributes, methods, and relationships using rectangles and arrows.
Illustrates user interactions with the system via ovals and stick figures.
A standardised visual language used to represent software design.
Q8
Class Hierarchy

Build a Computing Device Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree, then click Submit.

Inheritance Tree (base class on top)
·····
·····
·····
·····
·····

Available Classes

Server
Keyboard
OperatingSystem
Monitor
Computer
Laptop
CPU
PersonalComputer
Desktop
Q9
Abstract Class Hierarchy

Build the Appliance Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree. Abstract classes are shown in italics with an amber accent — slots expecting an abstract class are pre-marked with «abstract». Click Submit when you're done.

Inheritance Tree (base class on top)
«abstract»
«abstract»
·····
«abstract»
·····

Available Classes

Temperature
Motor
Refrigerator
Electricity
Appliance
CoolingAppliance
Oven
HeatingAppliance
Q10
Quiz
Select 0/1

When defining the relationship between a 'Car' and an 'Engine', which of the following is correct?

An Engine HAS-A Car (Composition/Aggregation).
An Engine IS-A Car (Inheritance).
A Car HAS-A Engine (Composition/Aggregation).
A Car IS-A Engine (Inheritance).
Q11
Concept Match

Match the Polymorphism Term to its Description

Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.

Overriding
drag a definition here…
Overloading
drag a definition here…
Polymorphism
drag a definition here…
Abstract Method
drag a definition here…

Definition Pool

Multiple methods in the same class share the same name but differ in their parameter lists.
A subclass provides its own implementation of a method inherited from the base class.
A method declared in a base class that has no implementation and must be overridden.
The general ability of a single interface to represent multiple forms.
Q12
Quiz
Select 0/1

Consider two methods in the same class: 'calculate(int x)' and 'calculate(float x, float y)'. What is this an example of?

Method Overriding
Multiple Inheritance
Encapsulation
Method Overloading
Q13
Abstract Class Hierarchy

Build a User Interface (UI) Component Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree. Abstract classes are shown in italics with an amber accent — slots expecting an abstract class are pre-marked with «abstract». Click Submit when you're done.

Inheritance Tree (base class on top)
«abstract»
«abstract»
·····
«abstract»
·····
·····

Available Classes

Pixel
TextBox
UIElement
Container
Control
MouseClickEvent
Window
Theme
Button
Q14
Quiz
Select 0/1

Which of the following statements about Abstract Classes is true?

An abstract class cannot contain any states or properties.
An abstract class must contain all the final implementations for its methods.
An abstract class is incomplete and cannot be instantiated directly; it must be inherited from.
An abstract class can be directly instantiated to create objects.
Q15
Class Hierarchy

Build an Employee Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree, then click Submit.

Inheritance Tree (base class on top)
·····
·····
·····
·····
·····

Available Classes

Office
SoftwareEngineer
Employee
Salary
Manager
Department
Project
SeniorManager
Engineer

Part 4: Advanced Scenarios and Conventions

Section titled “Part 4: Advanced Scenarios and Conventions”
Q16
Concept Match

Match the Code Case Convention to its Example

Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.

Camel Case
drag a definition here…
Pascal Case
drag a definition here…
Snake Case
drag a definition here…
Screaming Snake Case
drag a definition here…
Kebab Case
drag a definition here…

Definition Pool

user-profile-image
calculateTotalAmount
calculate_total_amount
TemperatureSensor
MAX_ARRAY_SIZE
Q17
Abstract Class Hierarchy

Build a Media Library Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree. Abstract classes are shown in italics with an amber accent — slots expecting an abstract class are pre-marked with «abstract». Click Submit when you're done.

Inheritance Tree (base class on top)
«abstract»
«abstract»
·····
«abstract»
·····
·····

Available Classes

ReadableMedia
Duration
PlayableMedia
Volume
Page
Library
AudioTrack
Book
Movie
MediaItem
Q18
Quiz
Select 0/1

If a derived class 'EstateCar' defines a 'draw()' method that replaces the 'draw()' method inherited from the 'Car' class, what OOP feature is being used?

Multiple Inheritance
Overloading
Encapsulation
Overriding
Q19
Abstract Class Hierarchy

Build a Network Device Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree. Abstract classes are shown in italics with an amber accent — slots expecting an abstract class are pre-marked with «abstract». Click Submit when you're done.

Inheritance Tree (base class on top)
«abstract»
«abstract»
·····
·····
«abstract»
·····

Available Classes

EdgeRouter
Node
DataPacket
NetworkDevice
Bandwidth
ActuatorNode
SensorNode
IPAddress
Gateway
MacAddress
Q20
Class Hierarchy

Build a Document Hierarchy

Drag class names from the pool into the slots so each class sits below its parent in the inheritance tree, then click Submit.

Inheritance Tree (base class on top)
·····
·····
·····
·····
·····

Available Classes

Font
Document
TextDocument
Report
Invoice
Margin
FileSize
Spreadsheet
Printer

Congratulations on completing the Chapter 1 Knowledge Test! Review any questions you missed to ensure a solid foundation in Object-Oriented Programming principles before moving on to the next chapter.