1. 程式人生 > 實用技巧 >軟體工程作業7.8.9

軟體工程作業7.8.9

軟體工程-實踐者的研究方法 作業
HomeWork:
Q1(C7.4) Why do we say that the requirements model represents a snapshot of a system in time?
A: Because the stakeholders may don’t have a clear understanding of requirements at the begin of the projects so the model may change dynamically as the project progresses.

Q2(C7.9) Develop a complete use case for one of the following activities:

a. Making a withdrawal at an ATM.
b. Using your charge card for a meal at a restaurant.
c. Buying a stock using an online brokerage account.
d. Searching for books (on a specific topic) using an online bookstore.
e. An activity specified by your instructor.
A: Use case: Making a withdrawal at an ATM
Primary actor: Withdrawal person
Goal in context: To get the money from the ATM
Preconditions: ATM is still work and withdrawal person hold his/her card.
Trigger: The withdrawal person inserts the card into the card slot.
Scenario:

  1. Withdrawal person: inserts the card into the slot.
  2. Withdrawal person: enters the password.
  3. Withdrawal person: selects “withdraw”.
  4. Withdrawal person: take money.
  5. Withdrawal person: selects “exit”.
  6. Withdrawal person: removed card.
    Exceptions:
  7. Card not being valid or ATM machine does not have the required cash.
  8. Password is incorrect: homeowner reenters correct password.
  9. Withdraw is selected: the cash in the ATM is insufficient withdrawal person can’t get the money.
  10. Exit is selected: there is something wrong in the machine and the card can’t come out.
    Priority: Must be implemented.
    When available: First increment.
    Frequency of use: Many times, per day.
    Channel to actor: Via operation panel.
    Secondary actors: Record database
    Channels to secondary actors:
    Record database: Internet
    Open issues:
  11. Protection mechanism should be made to prevent user cards from being swallowed by machines.
  12. Define a fixed length of time that the withdrawal can stay on the operation interface without any operation

Q3(C7.10) What do use case “exceptions” represent?
A: It represent some error conditions the actor might encounter while using some function the system provided.

Q4(C7.11) Write a user story for one of the activities listed in question 7.9.
A: As a customer, I want to withdraw cash from my account in an ATM so that I can withdraw money without going to the bank and stand in a line. In this case, I will make sure that my account has that much of money and my card is valid and the ATM must have cash. When I make a cash transaction, ensure that my account is debited and ATM will dispense me with cash.

Q5(C7.12) Consider the use case you created in question 7.9, write a nonfunctional requirement for the application.
A: The environment of this transaction should confirm to be safe, and the data it produce during this transaction should be listed as personal privacy and can’t be used by anyone else.

Q6(C7.13) Describe what an analysis pattern is in your own words.
A: An analysis pattern is a solution to a previous modeling problem that can be reused in some similar situations.

Q7(C8.5) The department of public works for a large city has decided to develop a Web-based pothole tracking and repair system (PHTRS). A description follows:
Citizens can log onto a website and report the location and severity of potholes. As potholes are reported they are logged within a “public works department repair system” and are assigned an identifying number, stored by street address, size (on a scale of 1 to 10), location (middle, curb, etc.), district (determined from street address), and repair priority (determined from the size of the pothole). Work order data are associated with each pothole and include pothole location and size, repair crew identifying number, number of people on crew, equipment assigned, hours applied to repair, hole status (work in progress, repaired, temporary repair, not repaired), amount of filler material used, and cost of repair (computed from hours applied, number of people, material and equipment used). Finally, a damage fi le is created to hold information about reported damage due to the pothole and includes citizen’s name, address, phone number, type of damage, and dollar amount of damage. PHTRS is an online system; all queries are to be made interactively.
Draw a UML use case diagram PHTRS system. You’ll have to make a number of assumptions about the manner in which a user interacts with this system.
A:
在這裡插入圖片描述

Q8(C8.6) Write two or three use cases that describe the roles of various actors in the PHTRS described in Problem 8.5
A:
Use case: report the potholes
Actor: Citizen

  1. Citizen open the homepage of PHTRS online.
  2. Enter the account and password.
  3. The system shows the main function button on the page.
  4. Citizen select “report”.
  5. Citizen fill in street address, size, location, area of the potholes.
  6. Citizen save and upload the information.
  7. Citizen click the “submit”.

Use case: Construction workers

  1. Construction worker open the homepage of PHTRS online.
  2. Enter the account and password.
  3. The system shows the main function button on the page.
  4. Construction worker select “fill the worksheet”.
  5. The system displays the work order assigned to the construction worker.
  6. The construction worker chooses the corresponding work order.
  7. Construction worker fill in the number of personnel, equipment allocated, repair time, pothole status, filling materials, repair cost and other information.
  8. Construction worker click the “submit”.

Q9(C8.7) Develop an activity diagram for one aspect of PHTRS.
A: Activity diagram for report the potholes
在這裡插入圖片描述

Q10(C8.8) Develop a swimlane diagram for one or more aspects of PHTRS.
A: Swimlane diagram for report the potholes
在這裡插入圖片描述

Q11(C9.1) You have been asked to build one of the following systems:
a. A network-based course registration system for your university.
b. A Web-based order-processing system for a computer store.
c. A simple invoicing system for a small business.
d. An Internet-based cookbook that is built into an electric range or microwave.
Select the system that is of interest to you and develop a processing narrative. Then use the grammatical parsing technique to identify candidate objects and classes.
A: system: A Web-based order-processing system for a computer store
Processing narrative:
A Web-based order-processing system is allowed to log in with the user’s account and password, and obtain basic information such as the total order quantity and name in the current state. Select the corresponding order to display the detailed information, and process the order.
In the process of order processing, it is necessary to number and type all products, connect to the corresponding scanning order number machine, scan the selected products, and match the product number with the number on the order. If there is a match, the status of the order number will change to processed. If the match fails, the status of the order number will change to processing failed.

在這裡插入圖片描述

Q12(C9.2) Develop a set of operations that are used within the classes identified in Problem 9.1.
A:
在這裡插入圖片描述

Q13(C9.3) Develop a class model for the PHTRS system present in Problem 8.5.
A:
在這裡插入圖片描述

Q14(C9.4) Write a template-based use case for the SafeHome home management system described informally in the sidebar following Section 9.4.
A:
Use case: SameHome residential management functionality
Key players: homeowner, residential management system
Objective: To control all kinds of electronic devices in the house
Early conditions: The system supports sensor function and has Internet interface
Trigger: The owner decides to control the equipment in the house through an interface or the Internet

Scene:

  1. Access to the system: The homeowner USES the residential management system through the residential management interface on the PERSONAL computer or the Internet, and enters the account password or USES face recognition to access the system

  2. Function selection: The system management menu is displayed on the PC screen for the owner to select the corresponding function

  3. Operate the lighting management system: If the owner chooses to control the lighting in the room, the lighting in the house will be controlled by the wireless interface controller.

  4. Thumbnails of each room and the location and number of lighting equipment should be displayed on the screen, which is convenient for the owner to choose and control

  5. Functional application: If the owner decides to change a certain lighting equipment, the system will control to change the state of the corresponding lighting equipment through wireless sensor and control interface

  6. Return menu: The owner selects the return menu and the computer screen displays each control system module again

  7. Homeowner chooses thermostat: If the homeowner chooses this feature, the system immediately displays the floor plan of the house and shows the location of each heating and air conditioning unit for the homeowner to choose from

  8. Temperature regulation by the system: If the owner determines the location and data of temperature regulation, the system will regulate the temperature of the air conditioning or heating equipment at the corresponding location through wireless sensors

  9. The owner returns and selects the controlled audio-visual equipment: a list of all available equipment is displayed on the screen

  10. Owner determines the equipment: The system sends data and control information through sensors and applies it to the equipment to complete the control

Exception:

  1. Failed to connect to the Internet: check the network interface and network status and try to connect again
  2. Incorrect account password: Re-enter the account or password
  3. Face recognition failure: recertification within a limited number of times
  4. Sensor system error: you can choose to reply the default setting of the sensor in the system or use it after checking the sensor system offline

Priority: Must be achieved
When available: The first increment
Frequency of use: multiple times per day

How to use: from a control panel on your PC or the Internet
Secondary actor: sensor system
Sensor: Wired or wireless interface

Unresolved issues:

  1. Can you easily operate this system without entering the password
  2. How many times can face recognition be done at most?
  3. How many meters can the system be operated in the absence of network
  4. How to carry out safety inspection and maintenance of the system

Q15(C9.5) Develop a complete set of CRC model index cards on the product or system you chose as part of Problem 9.1.
A:

在這裡插入圖片描述