03 Laboratory Exercise 1 Application Development PDF
03 Laboratory Exercise 1 Application Development PDF
Jarl Renzo Rey O. Naguit, Nori Niko Yamamura, Cresalyn DelaCruz, Rosalie Bacolinao
-The violation for single responsibility principle is that book class contains another method, that does a
different function this violates the principles as it only allow one reason to change. our solution is to
create another class that contains that method that does that function. this way it has its only function
that others class can instantiate and use
-This class violate the OCP because, books need to modified. It should be extended for a new type of
class every book discount.
This study source was downloaded by 100000855152935 from CourseHero.com on 10-19-2022 20:20:34 GMT -05:00
https://www.coursehero.com/file/116051076/03-Laboratory-Exercise-1-Application-Developmentpdf/
-Liskov Substitution Principle (LSP)
-This class violate the LSP because, the subclass can’t be substituted to the base class, since shipping fee
can cause negative effect to BookOrder.
-In this Principle as you can see I’ve split the seeBookReview():void and displayBookRate():void to the
printed book action same as the audiobookaction. I’ve made a new User interface which is
PrintedBookUI and AudioBookUI in where with this design only audiobook user interface and
printedbook user interface will only have access to printedbookaction and audiobookaction and if the
interface IBookAction can choose between audiobookaction where if the user wants to hear the
playbookaudio or printedbookaction to display the book rate.
This study source was downloaded by 100000855152935 from CourseHero.com on 10-19-2022 20:20:34 GMT -05:00
https://www.coursehero.com/file/116051076/03-Laboratory-Exercise-1-Application-Developmentpdf/
-Dependency Inversion Principle (DIP)
-In this principle I separated the updatecookbookshelf and updatehistorybookshelf and made a new
class which is BookManagement that can only use the book interface if the book manager wants to
change the price and then it will be updated to all the cookbook and historybook if the manager change
the book price and the manager can sold the book. In conclusion the high-level class is the
BookManagement and the low-level classes is updatecookbookshelf and updatehistorybookshelf which
it depend on the same abstraction, which is the Book interface.
This study source was downloaded by 100000855152935 from CourseHero.com on 10-19-2022 20:20:34 GMT -05:00
https://www.coursehero.com/file/116051076/03-Laboratory-Exercise-1-Application-Developmentpdf/
Powered by TCPDF (www.tcpdf.org)