Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

1st SEMESTER 2020/21 FINAL EXAMINATION

Undergraduate  Year 3

CPT203

Software Engineering 1

Section A  Answer all questions (30 marks):

Question A.1

Fill in the blanks with the SINGLE MOST APPROPRIATE TERM among the following. (Note: terms may apply to none, one, or more than one blanks.) (10 marks)

Terms:

partition testing

event-driven

generalization

waterfall model

software process model

composition

unit testing

specialization

system testing

Agile methodology

component testing

aggregation

dependencies

system models

abstract models

requirements specification

guideline-based testing

reuse-oriented software engineering

requirements analysis

interactions

software development model

1.   A _______________ represents the order in which the activities of software development will be undertaken.   It describes the sequence in which the phases of the software lifecycle will be performed.

2.  _______________________ is based on the existence of a significant number of reusable components. The system development process focuses on integrating these components into a system rather than developing them from scratch.

3.   In the_____________, documentation is produced at each phase. This makes the process visible so managers can monitor progress against the development plan.

4.  ___________________ describe the external behavior of the system and its operational constraints. They should not be concerned with how the system  should be designed or implemented

5.   System modeling is the process of developing _______________ of a system, with each model presenting a different view or perspective of that system

6.   Sequence  diagrams  show  ____________  between  actors  and  the  system,  and  between system components

7.   In ______________ we take repeated, common, or shared characteristics between two or more classes and factor them out into another class.

8.   Real-time systems are often _____________, with minimal data processing

9.  _________________  is  the  testing  on  several  individual  units  are  integrated  to  create composite components.

10. In _______________ you identify groups of inputs that have common characteristics and should be processed in the same way. After that, you choose tests from within each of these

groups.

Question A.2

Provide a graphical model of the Test-Driven Development (TDD) process as it would be employed in support of agile methods such as Extreme Programming. Your model should incorporate only the following process activities: (listed in no particular order) (10 marks)

A: “Run the test together with other tests that have already been implemented.” (Show two possible outcomes of this activity in your model: “pass” and fail”)

B: Implement the new functionality and refactor.”

C: Write and implement a test for the new functionality.”

D: “Identify the new functionality.”

Use ovals (labeled A, B, C, or D to represent the four activities identified above), arrows,      diamonds, etc., to model the TDD process as discussed in class. (An illustrative example of a process model is shown below.)

Example process model:

 

Question A.3

Consider a simple shopping cart application that uses a Cart class to keep track of the items in the shopping cart and an Order class for processing a purchase as shown in the figure below. When  the  Order needs  to  determine the total  value  of the  items  in  the  shopping  cart,  the getOrderTotal method will iterates through the list maintain by Cart class. Modify the codes to produce a less coupled design for the classes. (10 marks)

 

Section B  Answer all questions (70 marks):

Question B.1

A banking system provides users with several services: (i) to check their accounts to see recent transactions and balances; (ii) to pay bills online; (iii) to buy and sell investments. All of these services require a secure log-in. If the system crashes or the network connection fails during a transaction,  all the  financial  data must be  left  in  a  consistent  state.  Complete the use-case diagrams for these requirements. (15 marks)

Question B.2

A simple Contact Management software has the following features: -

1.   A Contact consists of a Customer.

2.   Customer and Contact are created separately. If the Contact is deleted, you have to ensure that the Customer for the Contact will remind in the system for future use.

3.   Each Contact, at most, consists of only one Customer because at any given time, the Contact cannot represent multiple customers. However, Customer can have multiple Contacts.

4.   The Contact records information such as email address, phone number, and multiple Addresses.

5.   For any Contact, not all information is compulsory. However, the user must fill in at least one of the fields between email address, phone number, and Address.

6.   The Address should be recorded as street, town/city, state, postcode, and country.

Your task is to model the software. Complete the class diagram that consists of all the classes in the software, the relationships between the classes, and multiplicity specifications. (8 marks)

Question B.3

Produce a UML state machine diagram for a toy grabber machine with the following behaviors. (16 marks)

· Initially, the toy grabber machine is in an Idle state. In this state, the machine waits for the player to insert coins.

· When a player is inserting coins, the machine displays the number of coins collected.

· The player can press the cancel button any time before inserts the third coins. If (s)he does so, (s)he will get back all the inserted coins.

· If the player inserted 3 coins, the machine will play a song.

· After the song is finished, the machine starts to accept the player’s control. At the same time, the machine starts a timer to count down for 30 seconds.

· During the 30 seconds, the player can control the arm to move in 4 directions. The player can also hit a button to instruct the arm to grab the soft toy.

· After the 30 seconds, the arm will move back to the original location, and the game ends. · The machine will transit back to Idle state when the game ends.

Question B.4

In a library system, an asset checkout process works as below: -

The patron scans his/her library card to start the asset checkout process. After scans the library  card, the system will check the patron’s account. If the patron has no unpaid fine, the system      will proceed to scan the asset’s barcode. If the patron has an unpaid overdue fine, the system      will prompt the patron to pay the fine. The patron can choose not to pay, in which case the         system will end the checkout process without checking out any asset. If the patron chooses to     pay the fine, the system proceeds to pay the overdue fine and continue with scanning the asset’s barcode. Finally, the system adds the asset to the patron’s account. At the same time, the system marks that asset as checkout. Produce an activity diagram to illustrate the above asset checkout  process. (16 marks)

Question B.5

Given the below scenario for a use case, complete a sequence diagram for the use case (15 marks)

Basic Flow:

1.   The customer arrives at a POS checkout counter to pay for the goods (s)he wants to purchase.

2.   The cashier starts a new sale.

3.   The cashier enters the item identifier.

4.   The system records the sale line item and presents item description, price, and the running total.

5.   The cashier repeats steps 3-4 to until all goods are counts.

6.   The system calculates the taxes and presents the total.

7.   The cashier tells the Customer the total and asks for payment.

8.   After the customer pays, the cashier updates the sales record with payment.

9.   The system presents the receipt.

10. The customer leaves with receipt and goods (if any).