Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

1\. This design principle suggests that all the derived classes of a base class should be able to perform the same behavior as their base class without negative side effects.\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Liskov Substitution Principle\ D. Interface Segregation Pri...

1\. This design principle suggests that all the derived classes of a base class should be able to perform the same behavior as their base class without negative side effects.\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Liskov Substitution Principle\ D. Interface Segregation Principle 2\. This structural design pattern allows objects with incompatible interfaces to collaborate\ A. Adapter Pattern\ B. Bridge Pattern\ C. Composite Pattern\ D. Decorator Pattern 3\. When applying changes to the software, unexpected parts of the software break. Which characteristic of poor software design is described?\ A. Rigidity\ B. Fragility\ C. Immobility\ D. Variety 4\. This behavioral design pattern suggests that when an object changes state, all of its dependents are notified automatically.\ A. Iterator Pattern\ B. Observer Pattern\ C. Strategy Pattern\ D. Proxy Pattern 5\. Software is hard to change because every applied change will affect many parts of the software. Which characteristic of poor software design is described?\ A. Rigidity\ B. Fragility C. Immobility\ D. Variety 6\. This feature of design patterns describes the responsibilities and collaborations of elements that make up the design.\ A. Pattern Name\ B. Problem\ C. Solution\ D. Consequences 7\. This feature of a design pattern describes when to\ use the pattem.\ A. Pattern Name\ C. Solution\ D. Consequences 8\. This feature of design pattems refers to the results and interchanges of applying the pattern.\ A.. Pattern Name\ B. Problem\ C. Solution\ D. Consequences 9\. This creational design pattern ensures that a class has only one (1) instance while providing a global access point to the instance.\ A. Singleton Pattern\ B. Factory Method Pattern\ C. Prototype Pattem\ D. Abstract Factory Pattern 10\. This design principle suggests that flexible software are those with classes that rely on abstract classes or interfaces.\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Interface Segregation Principle D. Dependency Inversion Principle 11\. This category of design pattern describes how communication happens between objects.\ A. Creational Pattern\ B. Structural Pattern\ C. Behavioral Pattern\ D. Singleton Pattern 12\. This design principle states that when there are new software requirements, the new behavior must be added by deriving a new class without modifying the existing class.\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Liskov Substitution Principle\ D. Interface Segregation Principle 13\. This design principle suggests that each software module should have only one (1) reason to change.\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Liskov Substitution Principle\ D. Interface Segregation Principle 14\. The software modules are hard to reuse in another software because these cannot be extracted from the current software. Which characteristic of poor software design is described?\ A. Rigidity\ B. Fragility\ C. Immobility\ D. Variety\ \ 15. This design principle advises software engineers to avoid relyingSTI\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Interface Segregation Principle\ D. Dependency Inversion Principle\ \ 16. A class named BankAccount is modified every time a new type of bank account is added. This scenario violates which design principle?\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Liskov Substitution Principle\ D. Dependency Inversion Principle 17\. Which best describes the Proxy pattern?\ A. It allows developers to produce families of related objects without specifying their concrete classes.\ B. It allows developers to traverse elements of a collection without exposing its underlying representation.\ C. It allows developers to provide a substitute or placeholder for another object. D. It allows developers to construct complex objects step by step. 18\. Which best describes the Builder pattern?\ A. It defines an interface or abstract class for creating objects in a superclass but allows subclasses to alter the type of objects to be created.\ B. It allows developers to produce families of related objects without specifying their concrete classes.\ C. It allows developers to construct complex objects step by step.\ D. It ensures that a class has only one instance while providing a global access point to the instance. 19\. Which of the following is NOT a structural design pattern?\ A. Proxy Pattern B. Facade Pattern\ C. Flyweight Pattern\ D. Observer Pattern 20\. Which best describes the Prototype pattern?\ A. It allows developers to produce families of related objects without specifying their concrete classes.\ B. It allows developers to construct complex objects step by step.\ C. It allows developers to copy existing objects without making their code dependent on their classes.\ D. It allows developers to traverse elements of a collection without exposing its underlying representation 21 Which best describes the Bridge pattern?\ A. It allows developers to produce families of related objects without specifying their concrete\ classes. B. It allows developers to split a large class into two (2) separate hierarchies: abstraction and implementation.\ C. It allows developers to construct complex objects step by step.\ D. It allows developers to traverse elements of a collection without exposing its underlying representation. 22\. Which of the following is NOT a structural design pattern?\ A. Bridge Pattern\ B. Strategy Pattern C. Composite Pattern\ D. Decorator Pattern 23\. Which best describes the Iterator pattern?\ A. It allows developers to produce families of related objects without specifying their concrete classes.\ B. It allows developers to construct complex objects step by step.\ C. It allows developers to define a subscription mechanism to notify multiple objects.\ D. It allows developers to traverse elements of a callection without exposing its underlying representation. 24\. A payroll application consists of an Employee class that consists of methods belonging to multiple actors. This scenario violates which design principle?\ A. Single Responsibility Principle\ B. Open-Closed Principle\ C. Liskov Substitution Principle\ D. Interface Segregation Principle 25\. Which of the following best describes the Strategy pattem? \ A. It allows developers to define a family of algorithms, put each of them into a separate class, and make their objects interchangeable\ B. It allows developers to produce families of related objects without specifying their concrete classes.\ C. It allows developers to construct complex objects step by step.\ D. It allows developers to traverse elements of a collection without exposing its underlying representation. 26\. Which best describes the Factory Method pattern? on things that they do not use. A. It defines an interface or abstract class for creating objects in a superclass but allows subclasses to alter the type of objects to be created.\ B. It allows developers to produce families of related objects without specifying their concrete classes.\ C. It allows developers to construct complex objects step by step. D. It ensures that a class has only one instance while providing a global access point to the instance. 27\. Which of the following is NOT a structural design. pattern?\ A. Bridge Pattern\ B. Abstract Factory Pattern\ C. Decorator Pattern\ D. Facade Pattem\ \ 28. Which best describes the Flyweight pattern?\ A. It allows developers to fit more objects into the available memory by having multiple objects share common parts of a state.\ B. It allows developers to construct complex objects step by step.\ C. It allows developers to produce families of related objects without specifying their concrete. classes.\ D. It allows developers to traverse elements of a collection without exposing its underlying representation. 29\. A high-level class named UserManager relies on the low-level class named Email Notifier. This scenario violates which design principle?\ A. Open-Closed Principle\ B. Liskov Substitution Principle\ C. Interface Segregation Principle\ D. Dependency Inversion Principle 30\. Which of the following is NOT a creational pattern?\ A. Factory Method Pattern\ B. Prototype Pattern\ C. Adapter Pattern.\ D. Builder Pattern

Use Quizgecko on...
Browser
Browser