Академический Документы
Профессиональный Документы
Культура Документы
Requirement engineering
• It help software engineers to better understand
the problem to solve
• It is composed of the tasks that lead to an
understanding of what the business impact of
the software will be ($ consideration), what the
customer wants (including function, data, and
behavior), and how end users will interact with
the software (the interface part mentioned
before)
Requirement engineering
• To ensure doing right things instead of doing
things right
• For a complicated system, requirements may
be ambiguous, incomplete, or even conflict.
Requirement engineering solves the problems.
Requirement engineering tasks:
Inception (開端)
• Most projects begin when a business need is
identified, or a potential new market or service
is discovered
• Software engineers ask questions to establish a
basic understanding of the problem, the people
who want a solution, the nature of the solution
that is desired, and so on (中文曰:知己知彼,百
戰百勝).
Requirement engineering tasks:
Elicitation (引出)
• Obtain requirements from related
stakeholders, including:
– requirements (including those of hardware
and software)
– problem scope (to avoid fishing)
Requirement engineering tasks:
Elaboration (細緻化)
• Refine the requirements elicited from the
stakeholders
• It develops a refined model of software
functions (or the system to developed),
features, and constraints.
• It facilitate understanding more details of
requirements and correcting possible
requirements errors
Requirement engineering tasks:
Specification (開規格)
• The specification of a software system is
primarily composed of analyzed (or correct)
requirements
• Specification should be represented in a
model. The model can be nature
languages, formal languages, graph
notations, and so on
• Graph notations offers semi-formal
description for specifications
Requirement engineering tasks:
Validation (確認)
• Software engineers and customers
validate the specification they obtained.
• After validation, the specification becomes
a contract between Software engineers
and customers
Example: automating a library system
Library system: Inception
• Initiated problem: Establish an automated
library management system to replace
traditional manual systems
Library system: Inception
The function of the traditional manual work system (partial)
1. Sort and compile books numbers
2. Put books on shelves According to their numbers
3. Create an index card for retrieval
4. Provide pen and note paper
5. Access control
6. Processing borrowing books
7. Processing the return
8. Destroy the overdue return
9. Processing appointment requirements
10. Notify the appointment book that the book has been returned to the
library.
11. Processing expired books
Library system: Inception
• Which of the aforementioned functions should be automated? In this
example, the following functions are assumed to be automated (some
functions will change when they are automated)
1. Sort and write the book number -> Write the book number (assuming the
classification is still manual)
2. Create an index card for searching -> Provide search function
3. Processing borrowing books
4. Processing the return
5. Destroying the overdue return -> Making a default record and overdue list
6. Processing appointment requirements
7. Notify the appointment book that the book has been returned to the museum
-> Make a list of the book that has been returned to the library
8. Processing expired books
Library system: Elicitation
• Once you've determined which features to
automate, you can start collecting requirements
• The sources of demand are (they are all
stakeholders): library owners, librarians, library
users, and engineers who have developed
library systems. Alternatively, you can refer to
existing systems. All of the above should assist
in gathering requirements.
Library system: Elicitation
• After preliminary collection of requirements, the system should have the following
functions:
1. According to the classification of the book and the current collection status, the book
number is compiled.
2. Find the book that meets the requirements according to the user's query conditions.
3. When the user requests to borrow a book, check whether the user has the right to borrow
the book. If so, lend the book to the user and log in the borrowing information.
4. When the user returns the book, the user's borrowing record is cleared.
5. Regularly check borrowing records and make default records and overdue lists
6. When you have a user reservation, you can log in to the appointment information.
7. When the book is returned to the library, compare the reservation record to make a list of
the reserved books that have been returned to the library.
8. Regularly clear the records of expired books to be discarded and reflect on the collection
status
Library system: Elaboration
• The aforementioned requirements are too
vague, so they need to be described in
more detail. The following slides show the
results of the aforementioned
requirements after elaboration.
Library system: Elaboration
1. According to the classification of the book and the
current collection status, the book number is compiled.
The result of Elaboration:
The user can make a query based on the title of the book,
the name of the author, or the title of the book. The book
should be printed out according to the year when the
query is completed, and the new year is placed in front.
Library system: Elaboration
3. When the user requests to borrow a book, check whether the user
has the right to borrow the book. If so, lend the book to the user and
log in the borrowing information.
The result of Elaboration:
When the user requests to borrow a book, check whether the user has
been suspended, default (ie, whether there is a default record
relative to the user), or the borrowing has reached the upper limit,
etc. If there is, the loan is refused. Otherwise That is, the book is
given to the user. After that, the book borrowing record of the book
is made, indicating who borrowed the book and when it expires. At
the same time, the book has been loaned and the total amount of
the user's borrowed book is increased by one.
Library system: Elaboration
4. When the user returns the book, the user's borrowing
record is cleared.
The result of Elaboration:
When the user requests the appointment book, check whether the user
has been suspended or defaulted (ie, whether there is a default
record relative to the user), and if so, refuse to accept the
appointment. Otherwise, make an appointment record, indicating
who to make an appointment to which book. Here we accept the
appointment of the borrower who has reached the limit, because he
may have returned some books before actually borrowing the book.
Library system: Elaboration
7. When the book is returned to the library, compare the reservation
record to make a list of the reserved books that have been returned
to the library.
The result of Elaboration:
When there is a book back to the library (that is, when the user still has
a book), check the reservation record. If the book is reserved,
indicate that the book is currently suspended for lending, and record
the book and the information of the reservation person in the
returned In the list of appointment books, the library staff informs the
reservation to borrow books (by manual notification)
Library system: Elaboration
8. Regularly clear the records of expired books to be
discarded and reflect on the collection status
The result of Elaboration:
When the user also deletes a book, the book is recorded relative to the
book, and the book is returned to the library and the total amount of the
user's borrowed book is reduced by one. In addition, the reservation
record is checked, and if the book is reserved, Indicate that the book is
currently suspended for lending, and record the book and the
information of the subscriber in the list of reserved books that have
been returned to the library for the library staff to inform the reservation
to borrow the book (by manual notification)
Library system: Elaboration
The above merges to get the following functions (note: some text modifications):
1. According to the book classification table and the current collection status, the
book number is compiled.
2. Find the book that meets the requirements according to the user's query
conditions.
3. When the user requests to borrow a book, check whether the user has the right
to borrow the book. If so, lend the book to the user and log in the borrowing
information.
4. When the user returns the book, the book's borrowing record is cleared, and the
reserved record is compared to make a list of the book that has been returned to
the library (combined with the original 4 and 7).
5. Regularly check borrowing records and make default records and overdue lists
6. When you have a user reservation, you can log in to the appointment information.
7. Regularly clear the records of expired books to be discarded and reflect on the
collection status
Library system: Elaboration
• The following data can be obtained by examining the
elaboration results of the aforementioned requirements
(data generally comes from the noun part of the
requirement description):
1. Book record: description title, author name, year, call
number, current status (eg: in the hall, loaned, suspended
lending, discarded, etc.)
2. Book Classification Table: Describe the classification of
books and corresponding English letters
3. Current status of the collection: Describe the
classification that has been numbered so far.
4. User record: Describe the user's name (or ID), the
maximum number of books that can be borrowed, the
Library system: Elaboration
• Data from elaboration results (continued):
6. Default record: Describe what user borrowed the book and when it has
expired
7. Appointment record: Describe the user who booked the book
8. List of appointments that have been returned to the museum: Describe why
the book is reserved by the user
9. Overdue list: Content of the total set of default records
10. Query conditions: Describe how the user can query (eg: title, author name,
or title keyword) and conditional content
11. Query results: Description of the book title, author name, year, call number,
and current status of the book (eg, in the library, loaned, suspended,
abandoned, etc.)
12. Expired books to be discarded: Description of the title and call number of
the expired book to be discarded.
Library system: Specification
• The result of Negotiation is represented by
a model to form the specification, which
will be represented by the UML use case
model.
• In the next slides, we will describe the
concepts and the use of use case model in
UML
Exercise 1
• Capture requirements for your system
UML model for requirements
(b)
actor
Example use case diagram
vending machine
buy
beverage
customer
perform
scheduled
maintenance
repair technician
make
repairs
load
items
stock clerk
Use case relationships
B C
Use case relationships
<<extend>>
B C
paper Jam handling
Use case relationships
<<extend>>
Return a car
<<include>> <<include>>
Add a member
Remove a member Manager
Check existence
<<include>> of a car
<<include>>
Check existence
of a member
Activity diagram