联系方式

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

您当前位置:首页 >> Database作业Database作业

日期:2018-10-08 09:52

Student ID number: ____________________ Pages: 6

Questions: 10

UNIVERSITY OF TASMANIA

EXAMINATIONS FOR DEGREES AND DIPLOMAS

October-November 2015

KIT506 Software Application Design and Implementation

Examiner: Dr James Montgomery

Time Allowed: THREE (3) hours

Reading Time: FIFTEEN (15) minutes

Instructions:

Attempt ALL TEN (10) questions. Each question is worth EIGHTEEN (18) marks.

The total for the examination is ONE HUNDRED AND EIGHTY (180) marks.

Carefully read a question before you start to answer it. It is recommended you spend

approximately 18 minutes on each question.

Answer each question on a new page and correctly label each answer with its

question number.

Return this exam paper with your answer booklet.

KIT506 Software Application Design and Implementation 2

continued…

Question 1

Consider the following excerpt from an RTM for a software development

environment similar to Visual Studio. Write the action–software reaction table that

would be part of the structured scenario for the use case described.

Entry Para Requirement Type Use Case

99 4.2.1 The user shall be able to recompile the entire

project.

SW UC99 User

builds Project

100 4.2.1 This action will be accessed via a “Rebuild”

menu item under the “Build” menu.

SWC

99

101 4.2.2 The system will only recompile source files that

have changed since last being compiled.

SWC

99

102 4.2.2 The user will be prompted to save any unsaved

changes prior to compilation; if they choose not

to then rebuilding will stop.

SWC

99

103 4.2.2 The system will compile source files one at a

time, and will stop the rebuild process if any

errors are encountered and report the error.

SWC

99

104 4.2.2 The compiled sources will then be combined

into a single executable file, in the Debug folder.

SWC

99

[18 marks]

Question 2

During analysis work that you did for your client, the “Amateur Theatre Group”,

you have collected the following information:

The theatre group presents a number of shows each year. Each show has a

title, start date and end date.

The theatre group employs a variety of staff (who work on the shows)

Each staff member may or may not work on a particular show

There are different kinds of staff in the company:

o Actors, who can speak and lookSerious

o Dancers, who can jump and glide

o Singers, who are also actors, but who can also sing and complain

o BackstageStaff, whose responsibility can be represented by a string

Actors (including singers) have an integer starRating, which indicates how

valuable they are to the show and its likely sales.

No dancer or backstage staff member is ever an actor, and no backstage staff

member is ever a dancer.

Each show has a director, who is an actor.

Draw a UML class diagram that best describes the above information. Include

attributes and methods that are mentioned in these classes. (Treat actions, like speak

or glide, as methods.) Include multiplicities where relevant.

[18 marks]

KIT506 Software Application Design and Implementation 3

continued…

Question 3

Draw a UML sequence diagram to show what happens when the following four

classes are executed as a C# application.

class Program {

static void Main(string[] args) {

A a = new A();

B b = new B();

a.Run(b);

}

}

class A {

public void Run(B b) {

C c1 = new C();

b.Use(c1);

b.Make();

}

}

class B {

public void Use(C c) {

c.Cede();

}

public void Make() {

C d = new C();

Use(d);

}

}

class C {

public void Cede() {

// code to be written

}

}

[18 marks]

Question 4

a What is a software design pattern? What information should accompany a

software design pattern?

[6 marks]

b Design patterns often lead to solutions with a greater number of classes. What

advantages do they provide to compensate for this added complexity?

[6 marks]

c Give an example of a software design pattern (other than Model-ViewController)

and describe a situation in which it could be used. Draw a simple

UML diagram to illustrate it.

[6 marks]

KIT506 Software Application Design and Implementation 4

continued…

Question 5

Consider the following class diagram. Write C# class declarations that represent this

structure. Do not include the using statements or the namespace declaration in your

answer. You may assume that all required namespaces are available. Each attribute

must be a public, auto-generated property. Any methods you write should be stubs,

with an appropriate header but no code within their body { }.

[18 marks]

Question 6

In parts (a)–(c) below suppose there exists a class called Product that represents the

products manufactured by some company. It has three public properties: Model (a

string), Price (a double, being the price in dollars) and Weight (a double, being its

weight in grams).

a Assuming the following declaration of a collection of Products

List<Product> products = new List<Product>();

that has been filled with Product objects, write a LINQ expression that selects

those products that weigh less than 500 grams.

[6 marks]

b Further suppose that there exists a MySQL database with a table called

product that has a string-valued column model, a Boolean-valued column

on_sale, and two double-valued columns price and weight. Write a

suitable SQL query to retrieve the information necessary to create Product

objects from the information in the product table.

[6 marks]

c Now assume that a MySqlDataReader called rdr has been created using the

query you defined in part (b), and that it has been executed and its Read()

method called to load the first result. Write a single C# statement to instantiate

a Product object using the data retrieved and assign it to a variable called p.

[6 marks]

enumeration?

State

Ready

Running

Broken

Machine

+Status: State

+Start(): void

+Stop(): void

Crusher

+Pressure: double

Welder

+Temperature: double

Part

+ID: string

+Installed: DateTime

0..* 0..1 has

KIT506 Software Application Design and Implementation 5

continued…

Question 7

a Describe some of the key features of the .NET Framework. What benefits does

it offer for software developers? (Write three to five sentences in total.)

[6 marks]

b With regard to WPF and XAML, what is data binding and what are some of

the benefits it provides?

[6 marks]

c Describe the benefits of defining data sources as resources in XAML rather

than creating them in the C# code-behind.

[6 marks]

Question 8

Parts (a) and (b) of this question relate to different GUI designs.

a Assume a WPF Window uses a Grid layout with two columns and two rows.

Write a fragment of XAML to create a Label with the name “lblName” that

occupies all of the lower-right cell in the grid. Have the Label display the text

“Testing”. Include only those properties that are necessary to achieve this

behaviour. Do not write the XAML for the containing Grid.

[9 marks]

b Consider the following excerpt from the XAML for an application’s main

Window. Draw a low-fidelity sketch of the GUI it defines. It does not have to

be to scale.

<Grid>

<Grid.ColumnDefinitions>

<ColumnDefinition Width="200*"/>

<ColumnDefinition Width="200*"/>

</Grid.ColumnDefinitions>

<ListBox Grid.Column="0">

<ListBoxItem>Item A</ListBoxItem>

<ListBoxItem>Item B</ListBoxItem>

<ListBoxItem>Item C</ListBoxItem>

</ListBox>

<StackPanel Grid.Column="1" Orientation="Horizontal">

<TextBlock Text="Hello " />

<TextBlock Text="World" />

</StackPanel>

</Grid>

[9 marks]

KIT506 Software Application Design and Implementation 6

*

Question 9

a Although different software development approaches vary in their details,

they all identify distinct activities such as requirements analysis, design,

implementation and testing. Why can we not write complete software

products immediately after discussing a client’s needs?

[6 marks]

b What are the aims of software testing?

[6 marks]

c Describe two kinds of software testing activities, including what development

stage they are used in and what kinds of faults they aim to uncover. Indicate if

those activities use black box or white box approaches, or a mixture of both.

[6 marks]

Question 10

Consider the following use case-based test for the application developed in your

assignments, and answer the questions that appear below the table.

Description When the user selects a name in the list the researcher details view

will be displayed.

Type and

Use Case

SW UC16_User_selects_Researcher

Criteria When the user selects a researcher in the researcher list the

application will show various details about them in the detail view.

Staff and students will show different details.

Method Black box test:

1. Open the RAP application

2. Select a researcher in the researcher list

3. Check the displayed details

Outcome Fail – no details shown

Method Black box test:

1. Select a staff member from the researcher list

2. Performance measure should be shown and correct

Outcome Fail – no details shown

a Is this test case sufficiently detailed to allow a tester to verify that the system is

behaving as expected? If not, where could more detail be added?

[6 marks]

b Based on your knowledge of the RAP system, are there enough test methods

in this test case?

[6 marks]

c Was either test based on knowledge of how the system was implemented in

code? Explain how you can tell from the details in the table.

[6 marks]


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

python代写
微信客服:codinghelp