TPF OOP WS

TPF OOP WS

Assessment

Flashcard

Computers

Professional Development

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

6 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is Object Oriented Programming?

Back

A Paradigm

2.

FLASHCARD QUESTION

Front

Should you use design patterns for everything?

Back

No

3.

FLASHCARD QUESTION

Front

Which of the following best describes the Single Responsibility Principle (SRP)? A class should be open for extension but closed for modification, A class should have only one reason to change, Subtypes must be substitutable for their base types, Clients should not be forced to depend on interfaces they do not use

Back

A class should have only one reason to change

4.

FLASHCARD QUESTION

Front

Which of the following best describes Open/Closed Principle (OCP): By ensuring functions are small and focused, By passing dependencies as parameters to functions, By adding new functions without modifying existing ones, By ensuring that functions can be used interchangeably if they have the same signature

Back

By adding new functions without modifying existing ones

5.

FLASHCARD QUESTION

Front

Which of the following best describes the Dependency Inversion Principle (DIP)? Options: High-level modules should not depend on low-level modules. Both should depend on abstractions, Subtypes must be substitutable for their base types., A class should have only one reason to change, Clients should not be forced to depend on interfaces they do not use.

Back

High-level modules should not depend on low-level modules. Both should depend on abstractions

6.

FLASHCARD QUESTION

Front

Which statement best explains the difference between Dependency Injection (DI) and Dependency Inversion Principle (DIP)?

Back

DI is a design pattern used to implement DIP by injecting dependencies, while DIP is a principle that suggests high-level modules should depend on abstractions.