Class Diagrams

advertisement
Class diagrams for Online Book System
Online book system
The online book club system maintains customer orders, customer information, and
book information. A customer gets one bonus point for each book she orders. Any
book can be ordered free using 10 accumulated bonus points. The customer can
display current bonus points, order books using bonus points or by credit card.
Version#1
In the first version of the online book store's Class diagram I have 3 classes which are
Book, Customer, and Book System. There are 2 kinds of issues I've made.
One is called refinement:
- I missed passing parameters in the methods.
- I wrote some methods that I don't have to mention in the class such as Get()&
Set().
The other are errors:
- I wrote '( )' in the attributes of the Customer's class,
- I missed order class and other classes to keep tracking for ordered books.
Version#2:
The above image I have modified the class diagram, I added the order class, Invoice
class in the class diagram, which was missing earlier.
In this 2nd version has errors:
- Missing the online Book system class.
- Mixing between Book class and ordered Book, and that causes confusing between
quantity of books that customers ordered and quantity of books in the stock.
Version#3
In this 3rd version, I have modified and added more classes to fix the 2nd version.
I added attributes in the Order class such as the total price, and status, also I added
Book ordered class to keep tracking how many books that customer has bought in the
Online book System. Sopping Cart class has number of books that customer bought in
the same transaction (one session).
Refinement: I duplicated the same attributes in different classes such as (date, status,
and total price in Order class, and Invoice class. So I can combine these classes
(Order class, Invoice class and shipping card class to gather) for improving the design
Version#4:
In this version, I enhanced the class diagram by combining the Order class, Invoice
class and shipping card class to gather.
Errors
- The Online Book Sys is missing methods such as login, FindAllBook and others.
Refinement:
- I missed writing PK in the Book, Person classes.
Version#5
In the 5th version I added more methods in the Online Book Sys
Refinement:
- I add another association between OnlineBook sys and Customer, and Book
Class.
Version#6
Version#7
Download