0% found this document useful (0 votes)
7 views

Laboratory Exercise Requirements Elicitation

Uploaded by

human being
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Laboratory Exercise Requirements Elicitation

Uploaded by

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

Laboratory Exercise

Requirements Elicitation
Single Responsibility
Principle (SRP)
Title
______________________________________ Author
-title: String ______________________________________
______________________________________ -author: String
+getTitle(): String ______________________________________
+setTitle(): String +getAuthor(): String
+setAuthor(): String

Book
______________________________________
+ searchBook (): void
Explanation:
The given class diagram deviates from the design core principle.
Since the Book serves so many purposes, it is not
associated with it. The graphic displays Single.
Principle of Responsibility (SRP). directly from the word
"SINGLE" denotes that there should be one student per class.
responsibility, a single goal, and everyone doing their part One job, one change-related reason. Onthe
diagram The Book and the Title are connected to the searchBook
the Author is on the page that is connected to get and set title identical diagram with Author get and
set.
Open-Closed Principle(OCP)

BOOKDISCOUNT
______________________________________
-discount: double
+getBookDiscount(): double
+setCookBookDiscount(): void
+setHistoryBookDiscount(): void

DISCOUNT
______________________________________
-Discount: Double
+ComputeDiscount(): void
Explanation:
The class diagram in question goes against the design tenet.
because it directly works with an implementation in practice.
Unlike an abstraction, it doesn't contain any new ideas.
codes. The picture displays the Open-Closed Principle.
(OCP) It promotes using interfaces to change
without changing the functionality of your application,
code. I've added new features to the solution I came up with.
I didn't include the code that is +computeDiscount(): void.
Modify any code to ensure that it complies with the principle.
Liskov Substitution Principle (LSP)

Book Delivery

+processBookDelivery():void
+setShippingFee():void

+processBookDelivery():void +processBookDelivery():void
+setShippingFee():void +setShippingFee():void
Explanation:
The presented class diagram deviates from the design tenet.
because the book may contain a mistake.
Ordering books online and delivery in Metro Manila.
The Liskov Substitution Principle is shown in the diagram.
The objects of a superclass should be replaceable.
without violating the with those of its subclasses
application. I've developed the solution I came up with.
the following code: void processBookOrder()
and + setShippingFee(): void due to the possibility of
encounter issues as a result of its incompleteness.
Interface Segregation Principle
(ISP)
<<interface>>
IBookAction

+seeBookReview():void
+displayBookRate():void
+playBookAudioSample():void

PrintedBookAction AudioBookAction

+seeBookReview():void +seeBookReview():void
+displayBookRate():void +displayBookRate():void
+playBookAudioSample():void +playBookAudioSample():void
Dependency Inversion Principle
(DIP)
BOOKMANAGEMENT

+bookSoldToClient():void
+changeBookPrice()void
+paymentBook():void
+checkOutBook():void

UpdateHistoryBookShelf UpdateCookBookShelf

+updateBookShelf(): void +updateBookShelf(): void

BOOKPRICE
BOOKPAYMENT
BOOKCHECKOUT

You might also like