CS代考 Student ID number: ____________________ Pages: 7 Questions: 10 – cscodehelp代写

Student ID number: ____________________ Pages: 7 Questions: 10
UNIVERSITY OF TASMANIA
EXAMINATIONS FOR DEGREES AND DIPLOMAS
October–November 2017
KIT506 Software Application Design and Implementation
Instructions:
Examiners: Dr Julian Dermoudy and
Time Allowed: THREE (3) hours Reading Time: FIFTEEN (15) minutes
Attempt all 10 questions. Each question is worth 18 marks. The total for the examination is 180 marks.
Carefully read a question before you start to answer it. It is recommended you spend approximately 18 minutes on each question.
Return this exam paper with your answer booklet.

KIT506 Software Application Design and Implementation 2 Question 1
Consider the following excerpt from a social media site. The excerpt describes a use‐ case for viewing and posting messages. Write the action–software reaction table that would be part of the structured scenario for this use case.
Entry
Para Requirement
Type Use Case
134
5.2.1
(Once authenticated,) the user shall be shown messages posted by friends. These messages may be selected and the user will then be given the option to delete them, mark them as read, leave them as unread, or post their own message.
SW
UC134 Handle Messages
135 5.2.1
137 5.2.2
Deleting messages will be accessed via a SWC button labelled “Delete”. 134
The user shall indicate whether they wish to SWC complete the deletion or abandon it. 134
136
5.2.2
A warning message should be displayed indicating that deletion cannot be undone and asking for “Confirm” or “Cancel”.
SWC 134
138
5.2.3
If the user has not selected any messages to delete, a message will appear indicating this. After 5 seconds the message will disappear and the user will be returned to the main menu.
SWC 134
139
5.2.3
If the user has selected messages to delete then these should be deleted from their view. The user is returned to the main menu.
SWC 134
Question 2
The Animal Kingdom consists of many kinds of animals including birds and fish. All animals breathe, eat, and produce young. Both birds and fish lay eggs, but not all animals do.
Birds can be classified as ‘winged’ or ‘flightless’. Each has a height, a weight, and a common name. Flightless birds can run, while winged birds can fly.
Fish have a length, a weight, and a common name. All fish can swim.
Zoological gardens (zoos) contain many birds and many fish. A zoo can calculate how many fish it has and how many birds it has.
[18 marks]
continued…

KIT506 Software Application Design and Implementation 3
Draw a UML class diagram that best describes the above information. Include attributes and methods that are mentioned in these classes. (Treat actions, like run or swim, etc as methods.) Include multiplicities, enumerations, specialisation, and so on, where relevant.
[18 marks]
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{ Alpha = a }; b.Alt(a);
b.Exec();
} }
class A {
public void DoIt(C c) {
c.Display(this); }
}
class B {
public A Alpha { get; set; }
public void Exec() { Alt(Alpha);
}
public void Alt(A) { C c = new C();
a.DoIt(c); }
}
class C {
public void Display(A a) { /* code to be written */ }
}
Question 4
[18 marks]
a Why do software engineers use design patterns? Describe some of the advantages to using software design patterns.
[6 marks] continued…

KIT506 Software Application Design and Implementation 4
b Design patterns often lead to more complex solutions with a greater number
of distinct classes. Why is this?
[6 marks]
c It is likely that in your assignment you made use of Model‐View‐Controller pattern. What is it, and why was this pattern applicable in the assignment?
[6 marks]
Question 5
In parts (a)–(c) below suppose there exists a class called Plant that represents the plants found in a typical garden. Each plant has three public properties: Name (a string), Planted (the DateTime the plant was placed in the ground) and Poisonous (a bool, whether or not a person would become sick if the plant was eaten).
a Assuming the following declaration of a collection of Plants List garden = new List();
that has been filled with Plant objects, write a LINQ expression that selects those plants that are poisonous.
[6 marks]
b Further suppose that there exists a MySQL database with a table called botanicals that has a string‐valued column title, an integer‐valued column height, an integer‐valued column circumference, and a boolean‐valued column edible. Write a suitable SQL query to retrieve the information necessary to create Plant objects from the information in the botanicals 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 Plant object using the data retrieved and assign it to a variable called p.
[6 marks]
continued…

KIT506 Software Application Design and Implementation 5 Question 6
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 { }.
«enumeration» Type
Big Medium Small
TeaParty
+Name: String +Date: DateTime
+Play(): void
* invites 0..*
Dressable
+Dress(): void +Undress(): void
Question 7
a In five or six sentences total, list two reasons why version control (using tools such as Subversion) is important in software development.
[6 marks]
b What are the key differences between black box and white box 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 whether those activities use ‘pure’ black box or white box approaches, or are a mixture of both.
[6 marks]
Play(): void
Doll
+Name: String +Size: Type
Moveable
+Move(): void
[18 marks]
continued…

KIT506 Software Application Design and Implementation 6 Question 8
a In the .NET Framework, what is LINQ and what benefits does it provide to software development? (Write three to five sentences in total.)
[6 marks]
b Describe the purpose of and benefits from using Data Templates in XAML.
[6 marks]
c With regard to WPF and XAML, what is data binding and what are some of the benefits it provides? Include an example of how data binding may be used.
[6 marks]
Question 9
Consider the following use‐case‐based test for the application developed in your assignments, and answer the questions that appear below the table.
Description
Type and Use Case Criteria
Outcome
The user shall be able to filter the Research List view based on a researcher’s employment level or student status
SWC UC8_User_views_ResearcherList
When the user clicks on an employment level or “student” button, the system shall show only those researchers meeting that criterion.
Pass
Method
White box test:
1. Open the RAP application
2. Select an employment level or the “student” category
3. Check the displayed details to ensure those chosen are from the
selected category
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, are there enough test methods in this
test case? If not, what additional methods or steps would you add?
c Do the test types appear valid? Would you change them and why?
[6 marks]
[6 marks] continued…

KIT506 Software Application Design and Implementation 7
Question 10
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 three rows. Write a fragment of XAML to create a TextBlock with the name “txtSample” that occupies all of the top‐right cell in the grid. Have the TextBlock display the text “Hello World”. 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 should be approximately to scale, but does not need to be exact.




















Part A
Part B




[9 marks]
*

Leave a Reply

Your email address will not be published. Required fields are marked *