CS代考 Student ID number: ____________________ – cscodehelp代写

Student ID number: ____________________
Instructions:
UNIVERSITY OF TASMANIA
EXAMINATIONS FOR DEGREES AND DIPLOMAS October–November 2016
KIT506 Software Application Design and Implementation
Examiner: Dr James 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.
Pages: 6 Questions: 10

KIT506 Software Application Design and Implementation 2 Question 1
Consider the following excerpt from an RTM for a source control system like Subversion. The excerpt describes a file comparison tool. Write the action–software reaction table that would be part of the structured scenario for this use case.
Entry Para Requirement
Type Use Case
SW UC134 User compares Files
134 5.2.1 135 5.2.1
137 5.2.2
The user shall be able to compare pairs of files.
This action will be accessed via a button SWC labelled “Compare”. 134
The contents of the two files will be displayed SWC in adjacent panes. 134
136
5.2.2
The Compare button will be disabled by default, and become enabled when the user selects two files for comparison.
SWC 134
138
5.2.2
The two files will be compared line by line, and the non-matching lines will be highlighted in both file displays.
SWC 134
139
5.2.2
When the user double-clicks a non-matching line in one file its content will replace the corresponding line in the other file.
SWC 134
[18 marks] During analysis work that you did for your client, the “Aussie Electronics Store”,
you have collected the following information:
• The store sells various products, described by a text-based itemCode, a wholesale price and percentage markup. Products can calculate their price after markup.
• Products are either electronic or consumable:
o Electronic devices have a powerConsumption, expressed in watts, and can
calculate their energyStarRating (a number between 0 and 5)
o Consumable items have an expectedLifespan in months and have the
ability to leak (that is, they are mostly ink cartridges)
• In its current range of electronic products, the store sells:
o televisions, which have a size in centimetres; and
o amplifiers, which can breakGlass
• The store runs a number of sales each year during which the cost of selected
products is reduced by a certain discount percentage (the rate is the same for all products in the sale). Each sale has a start date and end date
Draw a UML class diagram that best describes the above information. Include attributes and methods that are mentioned in these classes. (Treat actions, like demonstrate or leak, as methods.) Include multiplicities where relevant.
[18 marks] continued…
Question 2

KIT506 Software Application Design and Implementation 3 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.TestDrive(B); a.TestC();
} }
class A {
public void TestDrive(B bee) {
bee.Drive();
}
public void TestC() {
C c = new C();
TestDrive(c);
}
}
class B {
public void Drive() {
TimeIt(); }
public void TimeIt() { /* code to be written */ } }
public void TimeIt() { /* code to be written */ } }
class C : B {
[18 marks]
a Why do software engineers use design patterns? Describe some of the
disadvantages to using software design patterns?
[6 marks]
b Design patterns often lead to more complex solutions with a greater number of distinct classes. What advantages do these more complex designs offer that compensate for the added complexity?
[6 marks]
c It is likely that in your assignment you made use of both the Adapter and Factory design patterns. Give a description of one of these two patterns, including a simple UML diagram to illustrate it. State why the pattern was applicable in the assignment.
[6 marks] continued…
Question 4

KIT506 Software Application Design and Implementation 4 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 { }.
Unit
* cohort 0..*
Student
+Code: string +Title: string +Level: Level +Enrolled: int
+ID: int +GivenName: string +FamilyName: string
+SitExam(duration: int): void
«enumeration» Level
Introductory Intermediate Advanced
International
+Origin: string
Question 6
Domestic
+IsTasmanian: bool
+PayHECS(fee : double)
In parts (a)–(c) below suppose there exists a class called Book that represents the books held in a public library. Each book has three public properties: Title (a string), ReadingAge (an int, being the typical minimum age of readers able to understand it) and Acquired (the DateTime the library purchased the book).
a Assuming the following declaration of a collection of Books List books = new List();
that has been filled with Book objects, write a LINQ expression that selects those books suitable for readers aged between 8 and 10 years, inclusive.
[6 marks]
b Further suppose that there exists a MySQL database with a table called item that has a string-valued column title, a Boolean-valued column lost, an integer-valued column reading_age, and a date-valued column acquired. Write a suitable SQL query to retrieve the information necessary to create Book objects from the information in the item 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 Book object using the data retrieved and assign it to a variable called b.
[6 marks] continued…
[18 marks]

KIT506 Software Application Design and Implementation 5 Question 7
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 in your explanation up to two examples of how data binding may be used.
Question 8
Parts (a) and (b) of this question relate to different GUI designs.
a Assume a WPF Window uses a Grid layout with three rows. Write a fragment of XAML to create a Label with the name “lblBooks” that occupies all of the centre row in the grid. Have the Label display the text “Books:”. 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.






Image 1
Image 2
Image 3
Image 4







[6 marks]
[9 marks] continued…

KIT506 Software Application Design and Implementation 6 Question 9
a Give two reasons why version control (using tools such as Subversion) is important in software development projects. Write five to six sentences total.
[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 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 Type and UC
The user shall be able to view an interactive list of staff employed by the School.
SW UC8_User_views_StaffList
Criteria
The application will show a list of a staff (formatted as Family Name, Given Name (Title)), ordered alphabetically. The user can filter the list by partial name match, employment category (all staff, academic, technical, administrative, casual), or both simultaneously.
Method
Black box test:
1. Open the HRIS application
2. Select ‘casual’ from the Show list
3. Select each staff member in list and confirm is ‘casual’
4. Select ‘all’ from Show list
5. Enter ‘s’ in Filter by name field and press enter
6. Displayed names should all contain an ‘s’
7. Select ‘technical’ from the Show list
8. List should reduce to show subset who are ‘technical’
Outcome
Fail – after step 2 the list is not changed, and first entry is not a ‘casual’ staff member
a Does this test rely on knowledge of how the system was implemented in code? Explain how you can tell from the details given in the table.
[6 marks]
b The software tester stopped as soon as this test failed. Should they have kept going? Should the test case be rewritten? Explain your answer.
[12 marks]
*

Leave a Reply

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