n this example, a Computer object keeps track of its amount of RAM and its OS version. It also has methods for upgrading the RAM and updating the OS. Two classes, a desktop computer, and a Phone, extend this class and implement its methods. A ComputerUpgrader object claims to be able to upgrade any Computer (that is, add more RAM and update the OS), but it really can't add more RAM to a phone, so it must check to make sure the Computer object it has been given isn't a Phone. This violates the ___ SOLID principle (chose the single best answer). Choose ADP OCP LSP ISP or DIP The Single Responsibility Principle (SRP)
In this example, a Computer object keeps track of its amount of RAM and its OS version. It also has methods for upgrading the RAM and updating the OS. Two classes, a desktop computer, and a Phone, extend this class and implement its methods. A ComputerUpgrader object claims to be able to upgrade any Computer (that is, add more RAM and update the OS), but it really can't add more RAM to a phone, so it must check to make sure the Computer object it has been given isn't a Phone. This violates the ___ SOLID principle (chose the single best answer). Choose ADP OCP LSP ISP or DIP
The Single Responsibility Principle (SRP)
The Open-Closed Principle (OCP)
The Liskov Substitution Principle (LSP)
The Interface Segregation Principle (ISP)
The Dependency Inversion Principle (DIP)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps