Search Header Logo

OOP Week 4 - UML and Pseudo-code Quiz

Authored by mario santos

Computers

University

Used 2+ times

OOP Week 4 - UML and Pseudo-code Quiz
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 • 1 pt

Why do we create a UML class diagram before coding our Car Rental system?

To generate code automatically in any language.

To have a clear, high-level view of classes, their attributes, and relationships.

To replace the need for a test plan.

To keep all variables in the public scope.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a standard UML class box, how are the sections typically arranged (from top to bottom)?

Methods, attributes, class name.

Class name, attributes, methods.

Class name, methods, attributes.

Attributes, methods, class name.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which attribute is most appropriate for a Car class in a Car Rental system?

isAvailable (boolean indicating availability)

userPassword (the user’s password)

globalCostIndex (applies to all vehicles at once)

CarColourSetting (a shared static variable)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it beneficial to write pseudo-code before coding?

It clarifies the logic without being tied to specific syntax, making it easier to plan.

It replaces comments in the final code.

It automatically creates UML diagrams.

It’s only useful for advanced programmers.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a Car Rental scenario, which of the following sets of classes is a likely starting point?

TaxCalculator, WeatherStation, PaymentGateway

MusicPlayer, GPSNavigator, Car

Car, User (or Customer), Manager

DateTime, Book, Librarian

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A functional requirement for a Car Rental system could be:

“A customer can rent up to 2 cars at once, if they are available.”

“The program must respond in under 2 seconds.”

“Use only C++ 20 standard.”

“Store the user password in plain text.”

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a User class needs to have multiple Car objects they’ve rented, which UML relationship is most appropriate?

Association (User “has” multiple Cars)

Inheritance (User extends Car)

Composition (Car can’t exist without User)

Realisation (User implements Car)

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?