联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2020-11-12 11:19

SWEN30006 Exam 2018 S1 Page 1 of 32

School of Computing and Information Systems

SWEN30006 Software Modelling and Design

Examination: 2018 End of Semester 1

Reading Time: 15 minutes This paper has 32 pages.

Writing time: 120 minutes Total marks for this paper: 120

Student Number: ________________________

Authorised Materials

? Calculators: Not permitted.

? Dictionaries: Paper-based language translation dictionaries are permitted provided they

are not annotated in any way.

? Notes: Two double-sided A4 sheets of notes are permitted.

Instructions to Invigilators

? Students should initially receive just this exam paper with 32 pages.

? Provide script books on request.

? Students may NOT keep the exam paper after the examination.

Instructions to Students

? Write your student number on this exam paper during writing time.

? Attempt all questions.

? The marks for each question are indicated at the beginning of each question.

? The marks are an indication of how much time should be spent on the question.

? Answer questions only in the boxes on the exam paper.

? The blank pages can be used for rough working and notes and will not be marked.

? State clearly and justify any assumptions you have made.

? Write legibly in blue or black pen.

? Draw diagrams legibly: pencil is permitted for drawing diagrams.

? You may request and use a script book if you run out of space in a box for your answer:

ensure your answers in the script book are clearly labelled with the question number.

? Mobile phones, tablets, laptops, and other electronic devices, wallets and purses must

be placed beneath your desk.

? All electronic devices (including mobile phones and phone alarms) must be switched off

and remain under your desk until you leave the examination venue. No items may be

taken to the toilet.

This paper is not to be reproduced and lodged with Baillieu Library.

SWEN30006 Exam 2018 S1 Page 2 of 32

This page intentionally left blank.

SWEN30006 Exam 2018 S1 Page 3 of 32

[15 marks]

For each of the following terms, briefly define it and explain its importance in relation to

software design:

a. Representational gap

b. Coupling

c. Cohesion

SWEN30006 Exam 2018 S1 Page 4 of 32

SWEN30006 Exam 2018 S1 Page 5 of 32

[10 marks]

In the context of domain modelling, for each of the following elements: define it, describe

when it should be used, and provide an example.

a. Description class

b. Composition

SWEN30006 Exam 2018 S1 Page 6 of 32

This page intentionally left blank.

SWEN30006 Exam 2018 S1 Page 7 of 32

[10 marks]

a. Describe the Information Expert pattern and provide an example to illustrate its

application.

b. Describe the Creator pattern and explain why particular Creator options are given

priority over others.

SWEN30006 Exam 2018 S1 Page 8 of 32

SWEN30006 Exam 2018 S1 Page 9 of 32

[7 marks]

In the context of mapping a design to code:

a. [2] The guideline for translating design classes to code is to work from least coupled to

most coupled. Briefly justify this guideline.

b. [5] Explain how design associations with multiplicities greater than one can be mapped

to code, and what should guide the choice of representation. Provide an example.

SWEN30006 Exam 2018 S1 Page 10 of 32

SWEN30006 Exam 2018 S1 Page 11 of 32

[10 marks]

Question 5 Part 1. [4 marks]

Briefly describe architectural analysis and why it is important.

Question 5 Part 2. [6 marks]

For each of the following, provide an example and briefly explain why it is architecturally

significant:

a. An architecturally significant functional requirement.

b. An architecturally significant non-functional requirement.

SWEN30006 Exam 2018 S1 Page 12 of 32

SWEN30006 Exam 2018 S1 Page 13 of 32

This page intentionally left blank.

SWEN30006 Exam 2018 S1 Page 14 of 32

[18 marks]

This question relates to the domain model below. This is the iteration-3 domain model for

the Monopoly case study from Applying UML and Patterns, 3rd Ed. by Larman.

SWEN30006 Exam 2018 S1 Page 15 of 32

Below is a list of changes to the Monopoly game. For each change, describe precisely or

draw the corresponding change (if any) that should be made to the Monopoly domain

diagram. You should not redraw the whole diagram.

a. [2 marks] A new move rule is introduced. If a Player P is about to move their Piece to

a Square, and there is already another Player’s Piece on that Square, Player P will

instead move their Piece to the next Square without a Piece already on it.

b. [2 marks] One of the Railroad Property Squares is replaced by another Income Tax

Square.

c. [6 marks] A new kind of square called a Park is created; there are four different Parks.

Every Player is required to choose their favourite Park at the start of the game (they

can choose the same Park if they wish). However, Players can’t own Parks.

d. [8 marks] For this change you should assume that: (i) every turn taken by a player is

numbered in sequence starting with 1; (ii) Properties can be bought and sold by

Players; and (iii) once a Property has been bought, it will always be owned by some

Player. New rules are introduced to the game that depend on knowing the

Properties owned by every Player in every turn. An example of one of these rules is:

when a Player lands on a Property, if they previously owned that Property they get a

discount on rental based on the total number of turns for which they owned that

Property. Note that we still need to know who owns which Properties currently (as

per the Owns association).

SWEN30006 Exam 2018 S1 Page 16 of 32

SWEN30006 Exam 2018 S1 Page 17 of 32

SWEN30006 Exam 2018 S1 Page 18 of 32

This page intentionally left blank.

SWEN30006 Exam 2018 S1 Page 19 of 32

[27 marks]

The passage below describes the ZProcess software system. It is important that this system

maintains a high degree of availability; the box below describes how this is to be achieved.

Question 7 Part 1. [5 marks]

This ZProcess system requires protected variation. What is protected variation, what are the

two different kinds of variations we need to consider, and which of these kinds is required

by ZProcess?

The Important_Process object needs to do_important_stuff() involving a special

algorithm ZAlg, which operates on a sequence of ZInput to generate a ZOutput. We

have access to two different versions of ZAlg, one implemented in a library ZAlg_Library

and one available through an external service ZAlg_Service. The external service can

deal with larger input sequences than the library, so the plan is to use the service when

available, but resort to the library otherwise.

SWEN30006 Exam 2018 S1 Page 20 of 32

A partial design class diagram (DCD) showing public elements and some code snippets from

the implementation for ZProcess are provided below.

Helper_ZAlg_Library

+ apply_ZAlg(zinputs :ArrayList<ZInput>) :ZOutput

Helper_ZAlg_Service

+ apply_ZAlg(zinputs :ArrayList<ZInput>) :ZOutput

Important_Process

+ zalg :ZAlg_Interface

+ zinputs :ArrayList<ZInput>

+ zoutput :ZOutput

+ do_important_stuff() :void

?interface?

ZAlg_Interface

+ apply_ZAlg(zinputs :ArrayList<ZInput>) :ZOutput

external::ZAlg_Service

+ start() :void

+ enter(zinput :ZInput) :void

+ finish() :ZOutput

third_party::ZAlg_Library

+ zAlg() :ZOutput

+ zAlg(zinput :ZInput) :ZOutput

+ zAlg(zinput1 :ZInput, zinput2 :ZInput) :ZOutput

+ zAlg(zinput1 :ZInput, zinput2 :ZInput, zinput3 :ZInput) :ZOutput

?use? ?use?

+zalg

SWEN30006 Exam 2018 S1 Page 21 of 32

Question 7 Part 2. [7 marks]

What GoF design pattern is most prominent in the ZProcess design? Describe this pattern,

with clear reference to the ZProcess system as a concrete example.

SWEN30006 Exam 2018 S1 Page 22 of 32

SWEN30006 Exam 2018 S1 Page 23 of 32

Question 7 Part 3. [15 marks]

Consider a case where do_important_stuff() generates exactly two ZInputs and applies ZAlg

to them. Illustrate this scenario with a design sequence diagram, using the methods in the

design/implementation elements provided above. Be sure to cover the behaviour for both

the service and library cases. You can assume that zalg is already initialised and all relevant

objects already exist.

SWEN30006 Exam 2018 S1 Page 24 of 32

SWEN30006 Exam 2018 S1 Page 25 of 32

SWEN30006 Exam 2018 S1 Page 26 of 32

This page intentionally left blank.

SWEN30006 Exam 2018 S1 Page 27 of 32

[23 marks]

The following questions refer to the passage below which describes the Pennand ATM

(Automated Teller Machine). The sentence numbering is provided to make it easier for you

to track the various elements of the description.

Question 8 Part 1. [5 marks]

Draw a use case diagram, covering the Pennand ATM description above.

Question 8 Part 2. [18 marks]

Draw a state machine diagram for the Pennand ATM, based on the description above.

1. The ATM allows an account holder to check the balance or make a withdrawal on

one of their accounts.

2. When the ATM is idle, they can insert their transaction card and enter their PIN; the

ATM will authenticate (via the banking network) the id from the card and their PIN.

3. If authentication is successful, the network will return the list of accounts associated

with the card. (Otherwise the ATM returns to the idle state.)

4. The customer can then select an account.

5. The ATM will retrieve (via the banking network) and then display the account

balance.

6. The customer can then choose to make a withdrawal from the selected account or

choose another account.

7. If the customer chooses to make a withdrawal, they then enter the amount; if their

account has sufficient balance, the ATM dispenses the amount in cash.

8. The customer can choose to end their transaction at any point other than when the

ATM is dispensing cash; on ending the transaction, the ATM will return to the idle

state.

9. A successful withdrawal is recorded via the banking network.

10. The ATM will return the account holders transaction card before returning to the

idle state (unless the card is identified as stolen – see below).

11. The Pennand ATM also has features designed to support ease of use, maintenance,

and security.

12. When a customer first inserts their card, the ATM will photograph the customer and

check the card details against a list of stolen cards (stored locally); a stolen card will

be kept in the ATM and a message sent to the Police Card Agency, before the ATM

returns to the idle state.

13. If the ATM at any stage detects a fault, it switches itself into out-of-service mode; a

maintenance technician can then use this mode to conduct diagnosis/repairs, before

shutting down and restarting the ATM.

SWEN30006 Exam 2018 S1 Page 28 of 32

SWEN30006 Exam 2018 S1 Page 29 of 32

SWEN30006 Exam 2018 S1 Page 30 of 32

SWEN30006 Exam 2018 S1 Page 31 of 32

SWEN30006 Exam 2018 S1 Page 32 of 32

End of the Exam Questions

End of the Exam Paper


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp