100% found this document useful (1 vote)
1K views11 pages

03 Laboratory Exercise 1

The document discusses several object-oriented design principles including the single responsibility principle, open-closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle. For each principle, it provides an example solution showing how the principle can be applied when designing classes and interfaces for a book ordering system.

Uploaded by

stapa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views11 pages

03 Laboratory Exercise 1

The document discusses several object-oriented design principles including the single responsibility principle, open-closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle. For each principle, it provides an example solution showing how the principle can be applied when designing classes and interfaces for a book ordering system.

Uploaded by

stapa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

REQUIREMENTS ELICITATION

SINGLE RESPONSIBILITY PRINCIPLE (SRP)


SOLUTION
User

Find Book
OPEN-CLOSED PRINCIPLE (OCP)
SOLUTION
getDiscount(): double
setDiscount(discount double): void

SetCookBookDiscount SetHistoryBookDiscount

getDiscount(): double getDiscount(): double


setDiscount(discount double): void setDiscount(discount double): void
setCookbookDiscount(discount double): void setHistorybookDiscount(discount double): void
LISKOV SUBSTITUTION PRINCIPLE
SOLUTION

BookDeliveryToMetroManila BookDeliveryOutsideMetroManila
null
INTERFACE SEGREGATION PRINCIPLE (ISP)
SOLUTION
DEPENDENCY INVERSION PRINCIPLE (DIP)
SOLUTION

displayBook(): void

ChangeBookPrice ChangeBookPrice

BookSoldToClient BookSoldToClient

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy