CS代考 SWEN30006 Software Modelling and Design Practice Exam

The University of Melbourne Department of Computing and Information Systems
SWEN30006 Software Modelling and Design Practice Exam
Reading Time: 15 minutes Writing Time: 2 hours
Total marks for this paper: 120

Copyright By PowCoder代写 加微信 powcoder

This paper has 4 pages including this page.
Authorised materials: No materials are authorised. Instructions to invigilators:
Each student should initially receive a script book.
Instructions to Students:
 Answer all questions.
 The marks for each question are indicated at the beginning of each question.
 Clearly number each question.
 Make sure that you add your student number to each answer script.
This examination contributes 60% of your total marks for the subject.
Page 1 of 4

Practice Exam
In the approach to “analysis” and “design” that has been studied in this subject, briefly compare and contrast these two terms. What is “analysis” about? What is “design” about?
Briefly, what are some motivations for creating
a) domain models, and
b) operation contracts?
Why are associations always drawn without navigation in analysis class diagrams, why are unidirectional navigation associations are more common than bi-directional in design class diagrams?
[12 marks]
For each of the following, choose true, false, or I don’t know. (Right answer is 1 mark, wrong answer is -1 mark, no answer or “I don’t know” is 0 marks. However, it is not possible to get a negative total from this exercise).
a) The idea of the High Cohesion GRASP pattern is that all the responsibilities having to do with a single responsibility area are given to a single class, e.g. all the responsibilities relating to data base access are given to a single class.
b) In an interaction diagram one can freely make any object send a message to any other object that is in the same diagram.
c) The phases of the Unified Process (inception, elaboration, construction, transition) are not equivalent to the phases of the traditional waterfall process model (analysis, design, implementation, test).
d) The idea in the Polymorphism GRASP pattern is that the same object can behave differently according to the need and the situation.
e) It is not meaningful to define attributes’ visibilities in an analysis level class diagram.
f) The temporal order of use cases is not expressed in use case diagrams.
SWEN30006-Practice Exam
Page 2 of 4
I don’t know False

[88 marks]
Consider the following passage.
Practice Exam
Consider a video rental store requiring an information system:
1. It is a stand-alone store, not part of a larger organization.
2. It rents only videos, not computer games or other items.
3. A “video” can be in any medium: tape, DVD, Blu-ray, and so on.
4. The nightly rental charge may vary by medium. For example, Blu-ray rentals are more
expensive than DVD rentals.
5. The nightly rental charge may vary by release date of the movie or TV series, and its date
of first appearance in the store: e.g. a recent release are the most expensive for the first week or so after arrival, and an old release stocked for the first time will be more expensive than a newer release which has been in the store for quite a while.
6. There are discounts for multiple nights of rental, e.g. three nights of rental will be less than three times the cost of one night of rental.
7. There are fees for late return of videos, which must be paid in full before any further videos can be borrowed: the late fee is the difference between the normal rental cost to the return date and the rental paid, plus the store’s late penalty (a percentage).
8. The store does not sell anything. For example, there are no sales of videos or food.
9. All transactions relate to rentals.
10. The store accepts only cash payments.
11. Each renter has a separate membership.
12. The store keeps a history of all rentals to inform what movies/series it should buy, and how many of each and on which media.
Question 5 Part 1. [12 marks]
Identify at least 4 use cases and related actors in the above passage. Draw the results in a UML use case diagram.
Question 5 Part 2. [24 marks]
Create a domain model (including concepts, associations and attributes) for the store based on the above passage.
SWEN30006-Practice Exam Page 3 of 4

Question 5 Part 3.[16 marks]
Consider the following additional passage on the video rental store.
Practice Exam
The condition of all disks in the store is monitored. When they first arrive, they are recorded as new. After every rental return, they are inspected. Once minor scratches appear, they are recorded as used. If they have any major scratches, they are recorded as damaged. Damaged disks are run through a repair machine which removes a thin layer of protective material from the disk. This can be done at most three times over the life of the disk. If the disk is restored by this action, it is recorded as used. If it isn’t restored (or had already been repaired three times) it is recorded as dead and thrown way, however for a title that is still popular, a new replacement disk will be ordered and substituted for the dead disk.
Create a state machine model for disks, clearly labelling transitions using the standard notation:
[ ] / Question 5 Part 4.[12 marks]
For each patterns below, describe it, including the problem it solves and how it solves it, using examples drawn from the video rental store.
a) The Strategy pattern
b) The Composite pattern
Question 5 Part 5.[12 marks]
Considering the information in both passages above, draw system sequence diagrams for
a) A member successfully borrowing two videos
b) A popular video disk being returned damaged, which the repair machine fails to restore.
Question 5 Part 6.[12 marks]
Translate your system sequence diagram from part (a) above into a design sequence diagram, explaining the patterns or principles you have applied to achieve this. You may include an instance of a class that encapsulates rental pricing, without showing the details of how pricing is calculated.
End of the Exam Questions
SWEN30006-Practice Exam
Page 4 of 4
End of the Exam Paper

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com