Question: Please create UML drawing for the below: + - - - - - - - - - - - - - - - - -

Please create UML drawing for the below:
+------------------+
| Book |
+------------------+
|- title: String |
|- author: String |
|- price: double |
|- quantity: int |
+------------------+
|+ getTitle(): String |
|+ getAuthor(): String|
|+ getPrice(): double |
|+ getQuantity(): int |
|+ setTitle(title: String)|
|+ setAuthor(author: String)|
|+ setPrice(price: double)|
|+ setQuantity(quantity: int)|
+------------------+
^^
||
||
+--------------------++----------------------+
| TraditionalBook || BookOnCD |
+--------------------++----------------------+
+--------------------+|- containsMusic: boolean|
+--------------------++----------------------+
+--------------------+
|
v
+-------------------+
| Publisher |
+-------------------+
|- name: String |
|- address: String |
+-------------------+
|+ addBook(Book: book)|
|+ removeBook(Book: book)|
|+ updateBookPrice(Book: book, newPrice: double)|
+-------------------+
|
v
+-------------------+
| Customer |
+-------------------+
|- customerID: int |
|- name: String |
|- paymentMethod: String |
+-------------------+
|+ purchaseBook(Book: book)|
|+ addPaymentMethod(paymentMethod: String)|
|+ viewPurchasedBooks()|
+-------------------+
|
v
+-------------------+
| Inventory |
+-------------------+
|- books: List |
|- totalBooks: int |
+-------------------+
|+ addBookToInventory(Book: book, quantity: int)|
|+ removeBookFromInventory(Book: book, quantity: int)|
|+ updateInventory()|
+-------------------+

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!