Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sami Uml Final Exam

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

南 京 航 空 航 天 大 学

第 1 页 (共 11 页)

二○二○ ~ 二○二一 学年 第 1 学期 《面向对象方法与 UML 建


模》考试试题
考试日期: 2020 年 12 月 30 日
班号 学号 姓名

题号 一 二 三 四 五 总分

得分 Samuel addisu 191864110

POINTS 20 一. Answer the following questions (each question 5 points , total 20


points)
Score

1. What are the main advantages of “Object-Oriented Method”?


Explain your point of view in context of software development project.

 Faster Development: OOD has long been touted as leading to faster


development. Many of the claims of potentially reduced development time are
correct in principle, if a bit overstated.
 Reuse of Previous work: This is the benefit cited most commonly in literature,
particularly in business periodicals. OOD produces software modules that can be
plugged into one another, which allows creation of new programs. However, such
reuse does not come easily. It takes planning and investment.
 Increased Quality: Increases in quality are largely a by-product of this program
reuse. If 90% of a new application consists of proven, existing components, then
only the remaining 10% of the code has to be tested from scratch. That
observation implies an order-of-magnitude reduction in defects.
 Modular Architecture: Object-oriented systems have a natural structure for
modular design: objects, subsystems, framework, and so on. Thus, OOD systems
are easier to modify. OOD systems can be altered in fundamental ways without
ever breaking up since changes are neatly encapsulated. However, nothing in
OOD guarantees or requires that the code produced will be modular. The same
level of care in design and implementation is required to produce a modular
structure in OOD, as it is for any form of software development.
 Client/Server Applications: By their very nature, client/server applications involve
transmission of messages back and forth over a network, and the object-message
paradigm of OOD meshes well with the physical and conceptual architecture of
client/server applications.
第 2 页(共 11 页)
 Better Mapping to the Problem Domain: This is a clear winner for OOD,
particularly when the project maps to the real world. Whether objects represent
customers, machinery, banks, sensors or pieces of paper, they can provide a
clean, self-contained implication which fits naturally into human thought
processes.

2. Explain simply what is “use case approach” and “RUCM” method, and what is the relation
between them?

A use case is a written description of how users will perform tasks on your
website. It outlines, from a user's point of view, a system's behavior as it
responds to a request. Each use case is represented as a sequence of simple
steps, beginning with a user's goal and ending when that goal is fulfilled.
 Package rucm contains functions to model and predict a time series using
Unobserved Components Model (UCM) (Harvey (1989)) which decomposes the
series into its salient components of trend, seasons, cycles, and regression
effects due to predictors.
RUCM is a use case modeling approach, and its goal is to restrict the way
users can document UCSs in order to reduce ambiguity, improve the
understandability of use case models, and facilitate automated
analysis to derive initial analysis models, which in the Unified Modeling
Language (UML)

3. How many relations that can be defined among classes? For each kind of the relations, explain it with
第 3 页(共 11 页)
a concrete example.

This reusability is possible due to the relationship b/w the classes. Object


oriented programming generally support 4 types of relationships that are:
inheritance , association, composition and aggregation. All these relationship is
based on "is a" relationship, "has-a" relationship and "part-of" relationship.

4. What is the purpose of building sequence diagrams? What are the similarities and main differences
between sequence diagrams and activity diagrams?
A sequence diagram is a type of interaction diagram because it describes how
—and in what order—a group of objects works together. These diagrams are
used by software developers and business professionals to understand
requirements for a new system or to document an existing process.

Activity and sequence diagrams are two behavior diagrams. The main


difference between activity diagram and sequence diagram is that the activity
diagram represents the flow of activities in a system while the sequence
diagram represents the sequence of messages flowing from one object to
another
第 4 页(共 11 页)

POINTS 20 二. Do you know that it costs a lot of money to get a “Certified Java
Programmer” certificate? It could cost you thousands of euros. Let’s
Score imagine we will develop a browser-based training system to help people
prepare for such a certification exam. A user can request a quiz for the
system. The system picks a set of questions from its database, and
composes them together to make a quiz. It rates the user’s answers, and gives hints if the user requests
it. Draw a use case diagram for this scenario.
第 5 页(共 11 页)
第 6 页(共 11 页)

三 A company consists of departments. Departments are located in one


POINTS 20 or more offices. One office acts as headquarter. Each department has a
manager who is recruited from the set of employees. Your task is to
Score model the system for the company. Task: Draw a class diagram which
consists of all the classes in your system, the attributes and operations,
relations between the classes, multiplicity specifications, and other
model elements that you find appropriate.
第 7 页(共 11 页)

四. A hotel room reservation management system. Draw a sequence


POINTS 20

Score
第 8 页(共 11 页)
diagram for the following scenario: when booking a room, members first log in to the system, query the
room information and make a choice. Then fill in and submit the pre-order online. According to the
reservation information, the system updates the member information, updates the room status to
reserved, and prompts the member to book successfully.
第 9 页(共 11 页)

Sequence diagram for Hotel Room Reservation system:


Sequence Diagrams are interaction
diagrams that detail how operations are carried out. They capture the
interaction between objects in the context of a collaboration. Sequence
Diagrams are time focus and they show the order of the interaction visually by
using the vertical axis of the diagram to represent time what messages are sent
and when.
第 10 页(共 11 页)
四.五. The automatic soft-drinks vending machine
(SVM) is free and self checking every 10 minutes. After receiving
POINTS 20 the cash, the SVM waits for the user to select the desired drink.
After the user makes a choice, the SVM checks whether the amount
Score of cash entered by the customer is enough to buy the drink. If it is
enough, the selected drink will be output; otherwise, it will wait for
the user to continue to invest in cash. If the user does not make up
the cash within one minute, the cash will be returned. During the purchase process, if the user presses the
"Cancel" button, the cash will be returned. Task: draw a state chart diagram for the SVM.
第 11 页(共 11 页)

You might also like