A hotel is made up of at least two rooms. Each room has a bathroom: shower or bathtub. A hotel accommodates people. It can employ staff and must be headed by a director. We only know the first and last names of the employees, directors and occupants.
Some people are children and others are adults (using children to work is prohibited). A hotel has the following characteristics: an address, a number of rooms and a category.
A room is characterized by the number and beds it contains, its price and its number.
We want to be able to know who is occupying which room on what date. For each day of the year, we want to be able to calculate the rent for each room based on its price and occupancy (the rent is zero if the room is unoccupied). The sum of these rents makes it possible to calculate the hotel's turnover between two dates.
Question: Give a class diagram to model the hotel problem
A company has set up software to track its products. All the company's staff can consult the system, either to check that a product exists, or to browse freely through the information. Any consultation must be preceded by a light authentication in which the person specifies their name and department. Engineers can carry out several updating operations for products (adding, removing, modifying). These operations must be preceded by a more thorough authentication, in which the engineer specifies his or her name and department and enters a password, which is verified by contacting the personnel management system. All operations (consultation and updating) are recorded in an access log and can optionally be accompanied by a printout of the documents for the director.
Question: Give a use case diagram to model the above problem
In a shop, the purchasing procedure is as follows: the customer enters the shop, browses the items, asking for information or trying them out. If there are enough items in stock, they pick them up, go to the checkout and pay for their purchases using any means of payment: cash, bank card or cheque. They may receive a discount on their purchases.
Question: Give the sequence diagram for the "pay for items at cash desk" use case