CS120 Midterm 2024
CS120 Midterm 2024
Level: ………………………. Group: ……………… / Major: ……….…….… Minor: ……………… / Master : ……………
Reminders
● Time: 90 minutes
● Note: There are 13 pages in this exam set. Please check the page numbers before you start to solve
questions.
● This is a closed-book exam. You are not allowed to use your own papers, documents, scripts, etc.,
nor any electronic equipment (notebook computers, calculators, cell phones, etc.)
● Note that answers in the array (2nd page) will be evaluated.
1
●
Question A B C D Points
Number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
1. Which section of an SRS document typically includes information about the software's
performance, scalability, and security?
A. Introduction
B. Functional requirements
C. Non-functional requirements
D. Appendices
2. In the requirement analysis step, the organization analyzes its information needs in more detail
and develops a detailed requirements specification :
A. that are expressed through a set of diagrams
B. that are expressed through various interview points
C. that are mentioned in an agreement between the user (customer) and the supplier of the
software
D. that are represented in the use case diagram
3
6. What is the equivalent of this diagram ?
a b c
A. a
B. b
C. c
4
9. What is the difference between a use case and a scenario in an SRS document?
A. A use case describes a set of interactions between an actor and the system, while a scenario
describes a specific sequence of steps within a use case
B. A use case describes a specific sequence of steps within a scenario, while a scenario describes a set
of interactions between an actor and the system
C. There is no difference between a use case and a scenario
D. A use case describes the software requirements, while a scenario describes the software design
A. Customer
B. Order
C. Product
D. All of the above
12.Based solely on the class diagram, can a product exist without being part of an order?
A. Yes
B. No
C. Impossible to determine
13.Imagine a new class called "ShoppingCart" is introduced. What type of relationship might exist
between ShoppingCart and Product?
A. Inheritance
B. Composition
C. Aggregation
D. Association
14.Imagine an "OrderLine" class is introduced to represent individual items within an order. What type
of relationship might exist between Order and OrderLine?
A. Inheritance
B. Composition
C. Aggregation
D. Association
5
15. Imagine a new class called "Inventory" is introduced to track product stock levels. How might the
Product class interact with the Inventory class?
A. Inheritance
B. Composition
C. Aggregation
D. Association
Exercise 2: Use case diagram
With a view to setting up a software system dedicated to the textile firm, we are mainly looking at a
few functionalities that will enable us to collect information on the products developed by the
company.
All company staff can consult the system, either to check that a particular product exists, or to
browse freely through the information.
Any consultation must be preceded by a basic authentication in which the person specifies his or
her name and department for subsequent statistical purposes.
Engineers can carry out various updating operations for the products for which they are responsible:
adding, removing and modifying product information.
These operations must be preceded by multi-factor authentication, during 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 (consultations and updates) are recorded in an access log and can optionally be
accompanied by a printout of the documents accessed.
6
Your use case diagram here!
7
Exercise 3: Class diagram
A hotel chain wants to endow itself with a computerized information system that facilitates its
customers management.
Concretely speaking, this hotel chain owns a number of hotels identified by their names and
characterized by their respective managers, categories, and capacities (i.e., number of rooms).
The chain can accommodate individual clients without going through travel agencies or clients sent by
travel agencies with which it has signed contracts.
For this purpose, the chain has to manage the following information about travel agencies (e.g., agency
code, name, address, email, phone number, and manager).
Each signed contract must establish a pricing grid that presents monthly accommodation rates. These
rates vary from one agency to another.
Contracts signed with each agency are archived under a unique code and characterized by the start date
and end date of the contract.
The following information about clients must be also saved (e.g., client code, last name, first name,
email address, date of birth, nationality, as well as the start and end dates of the stays they have made).
Travel agencies or individual clients need to contact the hotels to make reservations.
Hotels can confirm reservations based on room availability, which is automatically updated with each
guest arrival (resp. departure). The rooms, where clients will be accommodated, are identified by their
numbers and are characterized by their types (e.g., family, single, or double) and their status (e.g.,
available or occupied).
At the end of each stay, an invoice is delivered to each individual client for their stay payment.
Invoices (supposed to be numbered and dated) must include the duration calculated from the start date
to the end date of the stay, the daily rate of the stay, the total amount of the stay, VAT, and the total
including tax.
In order to better serve returning clients, the headquarters must be able to save, for each client, the start
and end dates of the stays they have made and in which hotels and rooms they have already stayed.
8
Your class diagram here!