[SOLVED] 代写 C Scheme GUI html Java junit UML compiler software network 2018 Semester 2 – Final Examination

30 $

File Name: 代写_C_Scheme_GUI_html_Java_junit_UML_compiler_software_network_2018_Semester_2_–_Final_Examination.zip
File Size: 970.26 KB

SKU: 5861483212 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


2018 Semester 2 – Final Examination
Software Design Methodologies/ Software Construction
(COMP2100/COMP6442)
Writing Period: 3 hour duration
Study Period: 15 minutes duration
Permitted Materials: One A4 page with notes on both sides.
Note also the standard lab tools are available including: Java, eclipse, gedit, vim, emacs, git, umbrello, dia, gcc, man, the calculator on the computer, …
The Java API is available at:
file:///usr/share/doc/openjdk-8-jdk-headless/api/index.html
NO calculator permitted (physical electronic device). Please Read The Following Instructions Carefully.
This exam will be marked out of 100 and consists of 5 questions. Questions are of unequal value. The value of each question is shown in square brackets. Questions that are partitioned into parts show the number of marks given to each part within square brackets.
Students should attempt all questions. Answers must be saved into the question’s directory (Q1, Q2, Q3, Q4, Q5) using the file(s) described in the question statement. If you do use Eclipse or Intelij then make certain that you either create projects that edit source files directly in these directories or that you copy your solutions to the correct directories before the end of the exam. Q2 is different for students doing COMP2100 and COMP6442. You must only complete the version of the question that corresponds to the course you are enrolled in.
Network traffic may be monitored for inappropriate communications between students, or attempts to gain access to the Internet.
Marks may be lost for giving information that is irrelevant. The marking scheme will put a high value on clarity so, as a general guide, it is better to give fewer answers in a clear manner than to outline a greater number of less clear answers.
Page 1 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

Question 1 Multiple Choice [30 marks]
The multiple choice questions are available via a program in the ‘Q1’ directory. This program is also used for entering your answers. To run the multiple choice program either:
1. startitbydoubleclickingtheicononthedesktopor 2. by starting it in a terminal. This is done by:
• opening a Terminal,
• from the command line change directory (cd) into the Q1 directory, and • run the java MultipleChoice program.
% cd ~/Q1
% java -jar MultiChoice.jar
Your answers are automatically saved every time you press a button. Hence once you have completed your answers you can simply exit from the program (either by pressing the window closing “x” or by selecting the “exit” menu item). Note at any time you can restart the program and change your answers. Do not edit files in this directory. Also you can only have one instance of the MultiChoice program running at any time.
There are 15 questions. Each answer you get correct gains you 2 marks, each incorrect answer loses 0.5 marks. Questions left unanswered neither lose nor gain marks.
If the question statement contains an underline, that is “____________”, then the selected answer should correctly complete the question statement. Some question statements may contain two underlined sections, in which case the answer has two parts separated by a comma. The first part corresponds to the first underlined section and the second part corresponds to the second underlined section.
Page 2 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

Question 2 – Short Answer [10 marks]
Highest marks are gained by providing clear, concise, and short answers. Save your answers in the text file ‘Q2answers.txt’ in the Q2 directory (this file is already created with places to add your answers, so edit the file ‘Q2answers.txt’ and save your answers directly into it). Use your favourite editor e.g. vim, gedit etc. Please make sure that this file is saved both as you progress through the exam and before the exam ends.
Only COMP2100 students complete parts (i),(ii), and (iii) below:
i. [4 marks] Describe the observer design pattern. Give an example of a situation in which it would be good to make use of this design pattern.
ii. [3 marks] What is a finite state machine? Describe how a finite state machine could be used in the implementation of a tokenizer that is used by a compiler.
iii. [3 marks] What is copyright? How do we protect copyright? Compare patents and trademarks.
Only COMP6442 students complete parts (i),(ii), and (iii) below:
i. [4 marks] Describe 3 important factors that you would consider when selecting which persistent format to use when developing an application. Provide an example of an application that requires persistent data storage, state which approach you would use and why (in terms of the factors you described).
ii. [3marks]Doesgitstoredifferencesbetweencommitsorcomplete“snap shots” of each commit state? Discuss the main advantage and the main disadvantage of the approach taken by git. How has git mitigated the disadvantage of the approach it takes?
iii. [3 marks] What is the advantage of using a factory design pattern (such as the factory method or abstract factory) over just using “new” in the code using the products of this factory?
Page 3 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

Question 3 [30 marks]
The aim of this question is to complete a mini software development project. This involves:
i) Understanding the requirements for a simple application,
ii) Creating a software design in UML,
iii) Implementing the application using Java,
iv) Demonstrating the use of some software engineering tools such as git, Makefiles v) Writing JUnit test cases and testing the implementation,
vi) Writing appropriate documentation.
Your code and answers must all be included in the Q3 directory.
Your have been asked to implement a simple program that collates assessment marks for students within a course and then produces a report which lists the student’s final marks and grades. Information about the break up of marks for the course is available within a json file called “outline.json”. The course convener will enter the information about the students in the class and their assessment marks via
a simple text based user interface.
{
“exam”: 60,
“assignment”: 10,
“labs”: 5,
“workshops”: 5,
“labtests”: 20
}
So if “outline.json” contained:
then a typical interaction a lecturer would have with this application would be:
Press “a” to add a new student or “r”to report final grades:
a
Enter the students id:
u1234567
Please enter the exam mark out of 60:
33
Please enter the labs mark out of 5:
3
Please enter the assignment mark out of 10:
9
Please enter the workshops mark out of 5:
3
Please enter the labtests mark out of 20:
13
Press “a” to add a new student or “r”to report final grades:
a
Enter the students id:
u7654321
Please enter the exam mark out of 60:
52
Please enter the labs mark out of 5:
4
Please enter the assignment mark out of 10:
8
Please enter the workshops mark out of 5:
4
Please enter the labtests mark out of 20:
18
Press “a” to add a new student or “r”to report final grades:
Page 4 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

r
Grade Report:
u1234567 61 C
u7654321 86 HD
The program has been implemented and provided for you in “src/StudentGrades.java” in the Q3 directory. Although functionally correct the design and implementation of this solution is very poor. Your task is to redesign and re- implement this program. You may (and should) create a number of classes for your solution. What you implement must work exactly the same as the “solution” provided, however, the design and implementation should be much better. It also may be more robust. So your implementation may check that input data is correctly entered. And if there is a problem you may give a helpful message to the user and an option to correct the problem.
At a later stage the lecturer plans to:
• have student marks persist so they can be viewed and edited and
• also to use a GUI rather than the command line interface for interaction with
the application.
However at this stage these features should not be included in your implementation, although, your design should consider such additions such that if they were to be added at a later stage you would be able to reuse classes and code.
In answering this question you may constrain the problem making some reasonable assumptions about the problem. Please state any assumption(s) you make in answering this question in the DesignSummary.txt file. Hint “/usr/share/java” holds jar files you may find handy.
Your tasks are:
a) [10marks]RedesignandimplementabasicversionoftheStudentGrades program using Java. Put your code in the Q3/src directory.
b) [3 marks] Creating a software design for the program in UML. Export the class diagram, as a png, to a file called UML.png in the Q3 directory. Provide a short summary explaining your design in the file named DesignSummary.txt provided in the Q3 directory. You can also state assumptions you make regarding the problem in this DesignSummary.txt file.
c) [2marks]SetupandusegitwithintheQ3directoryforrevisioncontroland make at least 3 commits.
d) [3 marks] Write JUnit unit tests for your program.
e) [2 marks] Write a Makefile for building the program with 3 targets: “make all”, “make clean”, and “make rundemo”.
f) [10 marks] Overall quality of submission. This includes aspects such as properly formatted code and UML diagram, enough detailed comments within code, appropriately named variables/fields/methods/classes, meaningful comments for git commits and use of appropriate design.
Page 5 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

Question 4 [20 marks]
The Q4 directory contains code that implements an integer set using a binary search tree. The implementation has had the code for “max”, “isIn”, and “delete” removed. You are required to complete the implementation replacing the missing code. Your answer must be placed in the Q4 directory within the src/NonEmptySet.java file.
i. [7 marks] Implement the “max” method within “src/NonEmptySet.java”. This method returns the maximum integer of the set.
ii. [7 marks] Implement the “isIn” method within “src/NonEmptySet.java”. This method returns true if the value given is an element of the set, otherwise it returns false.
iii. [6 marks] Implement the “delete” method within “src/NonEmptySet.java”. This method removes the integer provided from the set returning the new modified
set. Noting if the element is not in the set then the same set is just returned.
You may only modify these methods within “src/NonEmptySet.java”. Do not modify anything else. The solution you submit should compile. If say you are unable to get “delete” working you should just have your attempted code as a comment and have the method “return this;”. This will make testing easier as your solution will still compile and the “max” and “isIn” should still work.
Page 6 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

Question 5 [10 marks]
In this question you must implement a parser for the grammar:
::= | + |
::= ( ) |
Classes for tokenizing and representing expressions have been created and provided within the “Q5/src” directory. Also to test your implementation “DemoIntExpressions” is provided. Once you have completed your solution and run “DemoIntExpressions” you should see:
String1+ 1parses to (1+1) and evaluates to 2
String2-1+3parses to ((2-1)+3) and evaluates to 4
String1– 1parses to (1-1) and evaluates to 0
String(2+1) – (5-2)parses to ((2+1)-(5-2)) and evaluates to 0
String(2+1) – 5 -2parses to (((2+1)-5)-2) and evaluates to -4
Place your solution in “src/Exp.java” within the Q5 directory. In your solution you may only modify the static methods “parse”, “parseExp”, and “parseTerm” within “src/ Exp.java”. You may not modify the signatures of these methods. You may not modify any other classes or methods. You may not add any fields or methods to this abstract class. This question will be automatically marked so it is important that your solution compiles and runs exactly as required.
Page 7 of 7 – Software Design Methodologies – (COMP2100/COMP6442) 2018 s2

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 C Scheme GUI html Java junit UML compiler software network 2018 Semester 2 – Final Examination
30 $