ESS Exercise 6

ESS Exercise 6

University

11 Qs

quiz-placeholder

Similar activities

Use Cases and  Domain Classes

Use Cases and Domain Classes

University

15 Qs

Workshop_quiz_on Sk-learn

Workshop_quiz_on Sk-learn

University

15 Qs

MST 24: Chapter V quiz

MST 24: Chapter V quiz

University

11 Qs

10 ARTIFICIAL INTELLIGENCE

10 ARTIFICIAL INTELLIGENCE

10th Grade - University

10 Qs

QA Knowledge Challenge

QA Knowledge Challenge

University

10 Qs

Java OOP - Polymorphism

Java OOP - Polymorphism

University

15 Qs

Introduction to Computer Science Concepts

Introduction to Computer Science Concepts

6th Grade - University

10 Qs

PPL 223 - (QUIZ 3) Data Types and Structures

PPL 223 - (QUIZ 3) Data Types and Structures

University

15 Qs

ESS Exercise 6

ESS Exercise 6

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

An My B

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the Single-Responsibility Principle (SRP) state?

Handle multiple tasks at once

Be reusable in different projects

Have only one reason to change

Be open for modification

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following violates SRP?

A class that handles user authentication

A class that manages database connections

A class that performs unit tests

A class that handles both user authentication and database management

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the Open/Closed Principle (OCP) state?

Be closed for extension but open for modification

Be open for extension but closed for modification

Have multiple reasons to change

Handle concrete implementations directly

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which design pattern often supports the OCP?

Singleton

Factory

Observer

Strategy

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an example of violating the Open/Closed Principle?

Adding new if-else blocks to handle additional types

Extending a class without changing the original

Using interfaces for all dependencies

Using a for-loop to iterate over a list of objects

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the Liskov Substitution Principle (LSP) state?

Subtypes should add additional functionality to the base class.

Subtypes should reduce the behavior of the base class.

Subtypes must completely override the base class.

Subtypes must be substitutable for their base types.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would violate the Liskov Substitution Principle?

A subclass that changes the behavior expected by the base class

A subclass that does not use inheritance

A subclass that implements an abstract method

A subclass that implements an abstract method

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?