- facilitate better communication and understanding
- validate correctness against the requirements
- establish a blue-print of the software solution
In this module, we will only focus on how to construct simple class diagrams using basic notations such as:
- Classes with class names, attributes and operations
- Association with details of rolenames, multiplicity
- Generalization
Consider the following example, a class diagram showing the information of:
- 3 classes : BankAccount, AccountHolder, CashAccount and CreditCardAccount
- Each class is described with its own attributes and operations
- BankAccount is given a role-name of "Saving Account"
- Details of the multiplicity is : ONE BanckAccount belongs to ONE AccountHolder, ONE AccountHolder can only create ONE BankAccount (or Saving Account)
- 3 classes (BankAccount, CreditCardAccount, CashAccount) are related using Generalization which means "is-a-kind-of"
Do the following exercise: Identify three domain classes about the different kind of boats described. Use Unified Modelling Language (UML) to illustrate the details and the relationships among them.
“In general, all boats kept in the inventory can be described by its registration number, the manufacturer and the year of purchase. However, there are 2 special types of boats that need additional information to be stored in the database. These include the power boats which have to be identified by the number of engines and the fuel type. For sail boats, the number of sails have to be recorded.”
No comments:
Post a Comment