OOP Week 4 - UML and Pseudo-code Quiz

OOP Week 4 - UML and Pseudo-code Quiz

University

10 Qs

quiz-placeholder

Similar activities

Class Diagrams

Class Diagrams

University

15 Qs

DBMS QUIZZ

DBMS QUIZZ

University

10 Qs

CPP Prefi SHS

CPP Prefi SHS

University

10 Qs

Database | Entity Relationship Model

Database | Entity Relationship Model

University

10 Qs

CS8592 - OOAD - UNIT II - QUIZ IV

CS8592 - OOAD - UNIT II - QUIZ IV

University

15 Qs

Round 1

Round 1

University

10 Qs

INTRODUCTION TO OOPS

INTRODUCTION TO OOPS

University

10 Qs

OOP Week 4 - UML and Pseudo-code Quiz

OOP Week 4 - UML and Pseudo-code Quiz

Assessment

Quiz

Computers

University

Easy

Created by

mario santos

Used 1+ times

FREE Resource

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)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?