Tutorial 1
Tutorial 1
Exercise 1:
Propose the class diagram using UML notation, corresponding to each of the following questions,
justifying the type of relationships (cardinality, roles and constraints if necessary) between the
different classes of the proposed diagram:
1. A directory contains a set of files of different types: text, image, video. A file can also be a
structured file containing a set of records. A directory can be composed of subdirectories
(which are themselves directories).
2. A bank account can belong to a natural or legal person. A person can have multiple
accounts of different types (Savings, Current).
3. A modem is an input/output device. A keyboard, a mouse are input devices; a printer or a
monitor are output devices. Other devices can be identified.
4. A polygon is composed of several ordered points
5. An IT project is carried out by a team of developers (made up of several people), using one
or more programming languages and possibly a set of frameworks.
6. A gallery exhibits works, made by creators, and representing themes. A work has a single
theme. Customers, welcomed by the gallery, buy works at fluctuating prices, depending on
the date of purchase.
Exercise 2:
We want to automate the management of a library. To achieve this, we have analyzed its operation
and obtained the following list of rules:
Exercise 3:
A research laboratory hosts different members, who can be permanent researchers, associate
researchers, or PhD students. A researcher belongs to one and only one category. A person can be
a member of at most two laboratories.
The laboratory has a director who must be a member of the laboratory and can direct only one
laboratory.
A semi-annual remuneration is granted to each member and is calculated based on the member's
category and the percentage of work completed in the project.
The laboratory offers several material resources, categorized into two types: laptops and storage
devices.
● A resource has a state ("good," "average," "poor") and a unique number assigned at
creation (which cannot be modified). It can be assigned to a laboratory member (and the
assignment must be tracked).
● Laptops have an operating system, an antivirus license, and an annual maintenance cost, in
addition to their technical specifications (brand, processor, RAM capacity, disk capacity,
etc.).
● Storage devices are characterized by their brand and storage capacity.
The laboratory manages multiple research projects, which are specific to the lab and involve
members from all categories for a defined period (start date and end date) and a specific workload
percentage.
For example, Karim may be assigned to the "Decision Support System" project from January 2024
to June 2025 at 60% of his working time.
A project is characterized by a code, name, budget, launch date, and duration. Each project has
one leader and up to five members.
● PRFU
● PNR, which must be carried out in partnership with an economic partner (a company in a
specific sector).
Exercise 5: