程序代写代做代考 CSE207 – Assessment 2 Semester 1 – 2016/2017

CSE207 – Assessment 2 Semester 1 – 2016/2017
Section 1. Assessment Information
Assessment Number 2
Contribution to Overall Mark 10%
Submission deadline Friday 4pm on Dec.1 2016
Section 2. Relevant Learning Outcomes for this Assessment
[L1] realize the problems in designing and building significant computer systems;
[L2] understand the need to design systems that fully meet the requirements of the intended users;
[L3] appreciate the need to ensure that the implementation of a design is adequately tested to ensure that the completed system meets the specifications;
[L4] be fully aware of the principles and practice of an object-oriented approach to the design and development of software systems and their components;
[L5] be able to apply these principles in practice;

Section 3. Problem Description
Suppose you’re starting out to design a soda machine. Below is a listing of requirements for the Soda machine. Use this as a reference when completing the questions.
The main function of a soda machine is to allow a customer to buy a can of soda. The customer initiates a request by inserting money into the machine. He or she then makes a selection. If everything goes smoothly, the machine has at least one can of the selected soda in stock, and presents a cold can of the soda to the customer. Sometimes the machine does not have at least one can of the selected soda, so it presents a message to the customer, saying it’s out of that brand. Ideally, the message should prompt the customer to make another selection. The machine should also offer the customer the option of getting his or her money back. At this point the customer selects another brand and the machine delivers (if it’s not sold out of the new selection), or takes the option of receiving the money. The precondition is a thirsty customer. The post-condition is either a can of soda or the returned money.
A supplier representative has to restock the machine. Consider the “Restock” use case. The supplier initiates this use case because some interval (say, two weeks) has passed. The supplier’s representative unsecures the machine (probably by unlocking a lock, but that gets into implementation), pulls open the front of the machine, and fills each

brand’s compartment to capacity. The representative also refills the change reserve. The representative then closes the front of the machine and secures it. The precondition is the passage of the interval, the post condition is that the supplier has a new set of potential sales.
For the “Collect money” use case, the collector also initiates because an interval has passed. He or she would follow the same sequence of steps as in “Restock” to unsecure the machine and pull open the front. The collector then removes the money from the machine, and follows the “Restock” steps of closing and securing the machine. The precondition is the passage of the interval, and the post condition is the money in the hands of the collector.
For simplicity, we assume three components associated with the soda machine—a front, a register, and a dispenser. In this model of the soda machine, the front :
Accepts selections and cash,
Displays prompts like “Out of selection” and “Use correct change”; Receives change from the register and makes it available to the customer; Returns cash;
Receives a can of soda from the dispenser and makes it available to the customer.
The register :

Gets the customer’s input (that is, the selection and the cash) from the front;
Updates its cash reserve;
Checks for change.
The dispenser :
Checks the availability of a selection; Releases a can of soda.
Section 4 . Assessment Task Description
Following your assessment 1, which is the requirement analysis for the above problem, do the following:
a) Design a class diagram for the software (Assume the soda machine is an aggregation of the three components – a front, a register, and a dispenser.) (35%)
b) Design a collaboration diagram for “Restock” use case. (25%)
c) Provide a state chart diagram to describe “Soda Machine” status in the system. (25%)
d) According the state machine you design for task c, design test cases to cover all states and transition testing. (15%)
Section 5. How the work should be submitted

Taks a-d (hard copy) along with a cover page (see the next section for details) should be put into the Coursework Collection Box (labeled with Kaiyu Wan) opposite to the office SD473 – Building 2. Taks a-d (soft copy – all should be zipped into a single file) should be submitted to ICE. Note that task 1 and 2 must be drawn with Visual Paradigm tool.
Section 6 . Cover page
A cover page should indicate all of the following information:
a. The Assessment number.
b. Your name (in English), student ID and University e-mail address. c. Your degree program, e.g. ICS.
d. The module title and code.
e. Lecturer responsible.
f. Submission deadline.