Question

In: Computer Science

Draw the class diagram for the bank system given the following specifications: 1.One bank is associated...

Draw the class diagram for the bank system given the following specifications:
1.One bank is associated with 0 or more accounts
2. Each account is associated with exactly one bank
3. Current account, savings and money market are account types.
Show and discuss the different class relations in your diagram.

Solutions

Expert Solution

1.In the below diagram the relationship between bank and accounts is MULTIPLICITY.

Multiplicity allows to specify the cardinality. Bank can have many accounts(that is 0 or more).

Multiplicity option Cardinality
0..0 0 Collection must be empty
0..1 No instances or one instance
1..1 1 Exactly one instance
0..* * Zero or more instances
1..* At least one instance
5..5 5 Exactly 5 instances
m..n At least m but no more than n instances

2.In the below diagram the relationship between account and bank is AGGREGATION.

Aggregation is a variant of the "has a" association relationship, aggregation is more specific than association. Aggregation can occur when a class is a collection or container of other classes, but the contained classes do not have a strong life cycle dependency on the container. The contents of the container still exist when the container is destroyed.

To show aggregation in a diagram, draw a line from the parent class to the child class with a diamond shape near the parent class.

3.In the below diagram the relationship between account and account types is GENERALIZATION.

In generalization one class is inherited from another that means the instance of subclass is also the instance of super class.

To show inheritance in a UML diagram, a solid line from the child class to the parent class is drawn using an unfilled arrowhead.


Related Solutions

Draw the class diagram in draw.io software for an Airline Reservation system.
Draw the class diagram in draw.io software for an Airline Reservation system.
Draw the class diagram of : Patient registration system A patient arrives at the hospital for...
Draw the class diagram of : Patient registration system A patient arrives at the hospital for some medical treatment. The administrator asks the patient if she had been previously treated at this hospital. Patient provides the answer. Administrator asks patient for her personal details such as name, address, telephone, date of birth, and emergency contact. Patient provides details as requested. Administrator enters details into system. System verifies details. Administrator asks patient whether she is a public or private patient. Patient...
draw a uml diagram for a class
draw a uml diagram for a class
Given the following specification, design a class diagram using PlantUML. To design the class diagram, use...
Given the following specification, design a class diagram using PlantUML. To design the class diagram, use abstract, static, package, namespace, association, and generalization on PlantUML Specification: A school has a principal, many students, and many teachers. Each of these persons has a name, birth date, and may borrow and return books. The book class must contain a title, abstract, and when it is available. Teachers and the principal are both paid a salary. A school has many playgrounds and rooms....
1.For an information system at a library, draw i. a context diagram ii. a diagram O...
1.For an information system at a library, draw i. a context diagram ii. a diagram O DFD iii. an expert diagram 3 ( for the late penalty process) Assume that the Processes at the library are: A. enrolment of members B. issue Books/periodicals/DVD/Toys C. Return Books/periodicals/DVD/Toys D. Renew books/periodicals/DVD/Toys E. Late penalty after due date for return unless renewed F. Reserve Books/Periodicals/DVD/Toys
Draw Data Flow Diagrams for the following system. Starting with a context diagram, draw as many...
Draw Data Flow Diagrams for the following system. Starting with a context diagram, draw as many nested DFDs as you consider necessary to represent all of the details of the system described in the following narrative. Context diagram, Level-0, and Level 1 diagrams are required. You may choose to decompose to level-2, level-3, etc., if you think it’s necessary or if you would like to challenge yourself. Urban Life Club (ULC) is an innovative young firm that sells memberships to...
Draw a class diagram for a real estate firm that lists property for sale. The following...
Draw a class diagram for a real estate firm that lists property for sale. The following describes the organization: The firm has a number of sales offices in several states; location is an attribute of sales office. Each sales office is assigned one or more employees. Attributes of employee include employeeID and employeeName. An employee must be assigned to only one sales office. For each sales office, there is always one employee assigned to manage that office. An employee may...
Model a book Draw a class diagram representing a book defined by the following statement: “A...
Model a book Draw a class diagram representing a book defined by the following statement: “A book is composed of a number of parts, which in turn are composed of a number of chapters. Chapters are composed of sections.” First, focus only on classes and associations. Add multiplicity to the class diagram you produced. Refine the class diagram to include the following attributes: • Book includes a publisher, publication date, and an ISBN • Part includes a title and a...
Draw whole class diagram that represent Candy online shopping website. The class diagram should consist of...
Draw whole class diagram that represent Candy online shopping website. The class diagram should consist of following: 1) Inventory Management System 2) Delivery Management System 3) Production Management System 4) Order Management System 5) Payment Management System Note: The website offers special candy that with customer name.
Draw the component diagram for an airline reservation system.
Draw the component diagram for an airline reservation system.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT