Design Patterns & SOLID Principles for YP

Design Patterns & SOLID Principles for YP

Professional Development

30 Qs

quiz-placeholder

Similar activities

Domestic Cold Water 6035-02 | Part 4

Domestic Cold Water 6035-02 | Part 4

Professional Development

30 Qs

FAFD1

FAFD1

Professional Development

25 Qs

Organizational Behavior

Organizational Behavior

Professional Development

26 Qs

CCC Quiz Night

CCC Quiz Night

Professional Development

30 Qs

casting process

casting process

Professional Development

25 Qs

Sound Engineering Mock Exam

Sound Engineering Mock Exam

Professional Development

25 Qs

Charts

Charts

Professional Development

27 Qs

VSmart Dayanand College Class test 1

VSmart Dayanand College Class test 1

Professional Development

25 Qs

Design Patterns & SOLID Principles for YP

Design Patterns & SOLID Principles for YP

Assessment

Quiz

Professional Development

Professional Development

Easy

Created by

Dotnet Quiz

Used 2+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What does the 'S' in SOLID principles stand for?
a) Scalability Principle
b) Single Responsibility Principle
c) Separation Principle
d) Substitution Principle
None of these

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. Which SOLID principle is violated in the following code? java class User { public void saveToDatabase() { ... } public void sendEmail() { ... } public void validateInput() { ... }}
a) Open/Closed Principle
b) Liskov Substitution Principle
c) Single Responsibility Principle
d) Dependency Inversion Principle
None of these

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. The Open/Closed Principle states that classes should be:
a) Open for modification, closed for extension
b) Open for extension, closed for modification
c) Open for both modification and extension
d) Closed for both modification and extension
None of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. Which principle ensures that derived classes can replace their base classes without breaking functionality?
a) Single Responsibility Principle
b) Open/Closed Principle
c) Liskov Substitution Principle
d) Interface Segregation Principle
None of these

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. The Interface Segregation Principle suggests:
a) Using one large interface for all methods
b) Clients should not depend on interfaces they don't use
c) Interfaces should be implemented by multiple classes
d) Interfaces should contain only abstract methods
None of these

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. Which principle is demonstrated by injecting dependencies rather than creating them inside a class?
a) Single Responsibility Principle
b) Dependency Inversion Principle
c) Interface Segregation Principle
d) Open/Closed Principle
None of these

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. Which SOLID principle is violated when a subclass throws an exception that the parent class doesn't throw?
a) Single Responsibility Principle
b) Open/Closed Principle
c) Liskov Substitution Principle
d) Interface Segregation Principle
None of these

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?