COMP9412-soft2412代写
时间:2022-11-07
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 1/11
SOFT2412_COMP9412 Final Exam
Started: Nov 23 at 17:01
Quiz Instructions
20 ptsQuestion 1
Consider the following code snippet.
----------------------------- build.gradle -----------------------------------------
plugins {
id 'java'
id 'application'
}
repositories {
jcenter()
}
dependencies {
implementation 'com.google.guava:guava:29.0-jre'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
}
test {
useJUnitPlatform()
}
application {
mainClassName = 'GreetingApp'
}
----------------------------- GreetingApp.java --------------------------------------
---
package greet;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import java.util.List;
public class GreetingApp {
public static void main(String[] args) {
List newList = Lists.newArrayList("Hi","Everyone");
String result = Joiner.on(" ").join(newList);
System.out.println(result);
}
}
Imagine that you are working in a development team that uses CI/CD practices.
The team uses the following above code snippets in their CI/CD server. Examine
the code snippets and answer the following questions.
1. Your project builds successfully every time “gradle build” is executed, but it
shows an error when you run “gradle run” command. Explain what caused the
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 2/11
p 0 words
error from running "gradle run" command. Explain how how to fix that error. [4
marks]
2. Assuming that the error described in previous part (question part 1) is fixed,
one of your team members wants to generate the jar file from your project by
running command “gradle clean build” to build the project and then “gradle jar”
to generate the jar file. Explain why it is not best recommended to perform this
task in this way. [4 marks]
3. After checking the jar file, your team member found out that the jar file cannot
be run successfully due to an error. What changes should be made in
build.gradle and/or GreetingApp.java to make sure that the jar file can be run
successfully. [4 marks]
4. Discuss the steps required in Jenkins to make the jar file accessible/can be
downloaded in Jenkins for every successful build. [4 marks]
5. After performing the steps in the previous part (question part 4), discuss any
CI practice that can be satisfied after making the jar file accessible in Jenkins.
[4 marks]
Your answers must follow to the question's number sequence listed above. You
commands/code must execute without any errors and produce the correct output
as specified in each of the above tasks.


Edit View Insert Format Tools Table
12pt Paragraph
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 3/11
5 ptsQuestion 2
p 0 words
Consider a web application called StockTrain 3.8.2 which is being maintained by a
software development team. The team used a software package called PredictsX
2.0.1 in the the development of StockTrain 3.8.2
Which versions of PredictsX software package can be used safely in the future
releases StockTrain? Explain Why?


19 ptsQuestion 3
Consider the following scenario and answer the questions listed below based on
the provided information.
Edit View Insert Format Tools Table
12pt Paragraph
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 4/11
Assume you work on a group repository called “Group3Project” with a remote
repository called “remote”. The primary branch is named “client” branch and this
branch has been initialised and consists of several commits.
1. Assume that you want to work on your own branch called “feature-square” that
is based on the current “client” branch, write Git command(s) to create and move
the HEAD pointer to your new branch. [2 marks]

2. Assume that you have modified “app/src/main/java/Calc/Calculator.java” file
by adding a new method called “square()”, write Git command(s) to commit your
changes. [3 marks]

3. Write Git command(s) to switch back into the primary branch and obtain all
updates from the remote repository. [3 marks]

4. Write Git command(s) to apply your previous changes from your own branch to
the primary branch. [3 marks]

5. Assume that when you ran the previous command(s), you found out that
someone else has made another commit to the primary branch. The console
output prints “CONFLICT (content): Merge conflict in
app/src/main/java/Calc/Calculator.java”.
Write and update “Calculator.java” to fix the merge conflict, given the current
content of the file is as shown below. [4 marks]
package Calc;
public class Calculator {
<<<<<<< HEAD
public int addition(int a, int b) {
return a + b;
=======
public int square(int x) {
return x * x;
>>>>>>> feature-square
}
}

6. Write Git command(s) to continue the process in part (4) after updating the
previous file. [4 marks]
Your answers must follow the question's number sequence listed above. Your
commands/code must execute without any errors and produce the correct output
as specified in each of the above tasks.
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 5/11
p 0 words
13 ptsQuestion 4
Consider the code snippet "build.gradle" and answer the following questions.
----------------------------------------- build.gradle -------------------------------------------------
------
plugins {
id 'application'
id 'jacoco'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.2'
implementation 'com.google.guava:guava:30.1.1-jre'
}
application {
mainClass = 'gradlequestion.App'
}
tasks.named('test') {
useJUnitPlatform()
}
Edit View Insert Format Tools Table
12pt Paragraph
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 6/11
p 0 words
1. Modify the “gradle” file so that:
(a) Gradle will always run task “clean” first when “gradle build” command is
executed. [3 marks]
(b) Gradle will run task “build” and then task “run” when “gradle brun”
command is executed. [4 marks]
2. Write Gradle command(s) to print all Gradle tasks that includes the new tasks
added in question part (a) [3 marks]
3. Write Gradle command(s) to build the Gradle project but excluding task “jar”. [3
marks]
Your answers must follow the question's number sequence listed above. Your
commands/code must execute without any errors and produce the correct output
as specified in each of the above tasks.


10 ptsQuestion 5
Edit View Insert Format Tools Table
12pt Paragraph
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 7/11
p 0 words
(a) Jana is a scrum master on a team that develops games. She has noticed that
her team often commits to much more work in a Sprint than they can accomplish.
When she brought it up in the team’s retrospective, she learned that her
teammates are often pulled off of development tasks to deal with maintenance
requests for production software, which interrupts the flow of work for them.
Discuss what Jana should do to address this case? [5 marks]

(b) You’re an agile practitioner on a team that builds mobile applications. One of
your team members identified a problem during the last retrospective, pointing out
that the team’s velocity was getting lower with each two-week sprint. Afterward,
you find that the user stories the team is working on are often too big to be
completed in one Sprint, often carrying over into the next three or four Sprints
before they are completed. Discuss what should be done to address this
situation? [5 marks]

5 ptsQuestion 6
Edit View Insert Format Tools Table
12pt Paragraph
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 8/11
Consider a software company that developed a complex system for flight route
optimizing of aircraft. The system is being used successfully to perform route
optimization considering certain factors. One of the clients who use the software
requested from the software company to improve the route optimization by
considering additional factors. They both identified the potential modifications so
that it can be released in the next Sprint (3 weeks). The management of the
software company asked your software development team to complete the
modifications and test it before the end of the Sprint.
Apart from the view of Scrum method, discuss how would you respond to this
request? [5 marks]
6 ptsQuestion 7
You are managing a development team that is building software for determining
the best location-based services for mobile users called LocationsX. The
company’s management team informed you they would like to achieve the highest
levels of adoption in terms of making LocationsX software used by many software
applications. They also mentioned that they would like to increase the sharing of
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 9/11
the source code and any modifications that adopters might make when using
LocationsX source code.

Which software license would suggest to the company's management? Discuss
your answer with examples.

10 ptsQuestion 8
In the group project assignment 2, you have collaboratively worked as a group on
developing a movie ticket booking software. Your team should use agile
development tools and practices as well as follow the Scrum method. Each team
member should have implemented multiple user stories/features. Using an
example of a user story/feature you have implemented in the project, discuss how
CI works from the time you start working on the user story/feature until the feature
is implemented and integrated into the working version of the next increment
keeping in mind the teamwork. Note that you need to discuss the details of the
steps involved conceptually but without the need to write a script or source code.
Use bullet points. [8 marks]
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 10/11
12 ptsQuestion 9
A software development team is working on the development of a software
application that controls the timetable of trains. A software engineer implemented
the following method which is to be used by several classes.
public static int getNumDaysInMonth (int month, int year)
throws MonthOutOfBounds, YearOutOfBounds {
int numDays;
if (year < 1) {
throw new YearOutOfBounds (year);
}
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 10 || month
== 12) {
numDays = 31;
}
else if (month == 4 || month == 6 || month == 9 || month == 11) {
numDays = 30;
}
else if (month == 2) {
if (year%4 == 0) {
numDays = 29;
} else {
numDays = 28;
}
} else {
throw new MonthOutOfBounds(month);
}
return numDays;
}
2021/11/23 下午2:01 Quiz: SOFT2412_COMP9412 Final Exam
https://canvas.sydney.edu.au/courses/37981/quizzes/164719/take 11/11
Not saved
A software testing engineer has defined the following set of test cases to test the
above code.
(month = 1, year = 0), (month = 12, year = 1975), (month = 2, year = 2020),
(month = 4, year = 1923), (month = 2, year = 1977), (month = 13, year = 1950),
(month = -6, year = 1900)

Discuss the quality of the above test cases in terms of the likelihood to discover
bugs or any undesired behavior.
Submit Quiz
essay、essay代写