Search Header Logo
SOLID

SOLID

Assessment

Presentation

Computers

University

Practice Problem

Medium

Created by

Nimisha Roy

Used 13+ times

FREE Resource

2 Slides • 7 Questions

1

SOLID Quiz Examples

2

Multiple Choice

Which SOLID principle is most closely related to High Cohesion GRASP principle?

1

Open Close Principle

2

Single Responsibility Principle

3

Liskov Substitution Principle

4

Dependency Inversion Principle

3

Multiple Choice

Question image

Which SOLID principle is being violated in this code?

1

Single Responsibility Principle

2

Interface Segregation Principle

3

Open Close Principle

4

Dependency Inversion Principle

4

Multiple Choice

Question image

Which SOLID principle is being violated in this code?

1

Single Responsibility Principle

2

Interface Segregation Principle

3

Liskov Substitution Principle

4

Open Close Principle

5

Dependency Inversion Principle

5

Multiple Choice

Question image

Which SOLID principle is being violated in this code?

1

Single Responsibility Principle

2

Interface Segregation Principle

3

Liskov Substitution Principle

4

Open Close Principle

5

Dependency Inversion Principle

6

Multiple Choice

Suppose you want to create a <user> interface for a UI implementation, but you end up creating <admin>, <employee> and <customer> interfaces. Which SOLID principle did you adopt?

1

Open Close Principle

2

Interface Segregation Principle

3

Liskov Substitution Principle

4

Dependency Inversion Principle

7

Multiple Choice

Question image

Which SOLID principle is being violated in this UML diagram?

1

Single Responsibility Principle

2

Interface Segregation Principle

3

Liskov Substitution Principle

4

Open Close Principle

5

Dependency Inversion Principle

8

Multiple Choice

Question image

Which is the best solution to make this implementation LSP compliant?

1

Create Separate classes for Square and Rectangle with no inheritance

2

make Rectangle and Square siblings and introduce the interface Shape

3

Modifying the behavior of Rectangle to match Square by enforcing width and height must always be equal for Rectangle

9

media

SOLID Quiz Examples

Show answer

Auto Play

Slide 1 / 9

SLIDE