0% found this document useful (0 votes)
140 views3 pages

Class Diagrams for Management Systems

The document describes exercises to build class diagrams for different domains. The first exercise requires modeling staff, managers, and tasks where staff have attributes like ID and salary and perform tasks. Managers extend staff. The second models owners, pets, and veterinary services. The third models students enrolled in courses belonging to a campus. The fourth models customers, items, orders, and invoices with customers placing orders of items.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views3 pages

Class Diagrams for Management Systems

The document describes exercises to build class diagrams for different domains. The first exercise requires modeling staff, managers, and tasks where staff have attributes like ID and salary and perform tasks. Managers extend staff. The second models owners, pets, and veterinary services. The third models students enrolled in courses belonging to a campus. The fourth models customers, items, orders, and invoices with customers placing orders of items.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Exercise 1:

You are required to build the class diagram to manage some staffs and tasks. Each staff is managed by
the manager. The staff includes information: Staff ID, name, gender, basic salary, bonus salary (if the
staff is a manager, he/she will be paid a bonus salary). Each task is performed by one or many staffs.
This system need to record working hours of each staff per a task. Information of task includes: id, title,
begin date, end date, total hours.

1)OOA

Main noun: Staff ( ID,name, gender, basic salary)

Main noun: Manager(ID,name, gender, basic salary, bonus salary)

Main noun: Task (id, title, begin date, end date, total hours)
2)OOD: UML Working hours

Staff
-ID: number Task
-name: text perform
-ID: number
0..*
-gender:text -title: text
-basicSalary: number -beginDate:number
- 1..* Is performed -endDate: number
-totalHours:number
Constructor()
Getter/setter //methods
InputStaff()
extends
outputStaff()
Is-a/
1..*

Manage

Manager

- bonusSalary:number 3)OOP

Constructor()
Getter/setter()
inputStaff():override Exercise 2:
outputStaff():override
You are required to build the class diagram for a health hospital. This diagram is used to manage some
owners, some pets and services. The owner includes information: ID, name, address. Each owner has
one or many pets. Information of pet includes: id, name, birthday, gender. When a pet uses any services
the system needs to record them to charge money. Each service contains: Id, name, price

Owner Pet
Services
1..*
-ID:String -Id:int use 1..*
-Id:int
- name:String -name:String
-name:String
- address:String 1 -birthday:String
-price:int
//methods -gender:String 1..*
-Pet[] petlist;
-int nopet;
//methods
/methods

Exercise 3:

Build a class diagram to manage students and courses of FPTU. Each student includes: id, name,
address, gender. A student can enroll in some courses. Each course contains: code, name, credits.
Addition, each student belongs to the campus. Each campus includes: code, name, address.
enroll

1..*
1..*
Campus Student Course
1 1..*

Exercise 4:

Build a class diagram to manager Customers, Items, Orders, invoices. Each Item: id, name, price, status
( 1: đã bán, 0: chưa bán). Customer includes: id, name, address. Order contains: id, orderDate, shipDate,
TotalOfQuantity. Each customer has one or many orders and an order belongs to the customer. Each
Order has only one invoice.

1..*
1..*
Customer order Item
1 1..*
1

1
quantity
Invoice
ma: Number
date: String

You might also like