首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
1802/159.251辅导、讲解Java编程、Java程序语言调试 调试Matlab程序|讲解数据库SQL
项目预算:
开发周期:
发布时间:
要求地区:
Page 1 of 9 COS
1802/159.251
MTUI DISD
MASSEY UNIVERSITY
MANAWATU AND DISTANCE CAMPUSES
EXAMINATION FOR
159.251 SOFTWARE ENGINEERING DESIGN AND CONSTRUCTION
SEMESTER TWO 2018
_________________________________________________________________________________________________________
Time allowed is THREE (3) Hours.
This paper contains EIGHT (8) questions
Candidates must answer ALL EIGHT (8) questions
Questions are not of equal marks
Write your answers to all applicable questions in the Blue Answer Book supplied
Students may NOT remove any part of this question paper from the exam room.
The exam paper will be made available on the University Library website.
Page 2 of 9 COS
Question 1 – Design and DRY [8 marks]
Assume you have to design a student registration system for an university. In this system,
students are represented as instances of a class Student with several properties (id,
firstName, lastName, dob). A desktop graphical user interface (GUI) for this application is
provided by the class StudentEditor, and instances of Student are stored as xml
documents using a structure defined by the XML schema students.xsd.
a) For this kind of application, a design based on tiers (layers) is often used. Name the
tiers (layers) you would here, and describe the dependencies between these tiers !
[3 marks]
b) At some stage, a new boolean attribute isExtramural must be added to the Student
class. This will also require changes to the schema and the editor (form)
StudentEditor (a new text field must be added). Discuss the DRY principle using
this example, and which technologies can be used to facilitate this kind of change.
[3 marks]
c) Later, your client decides to change the application by providing a web-based user
interface. Using your answer to a) , describe the benefits of the tiered (layered)
design to facilitate this.
[2 marks]
Page 3 of 9 COS
Question 2 – Logging and Orthogonality [6 marks]
a) Explain the concept of orthogonality using log4j loggers, levels and appenders as an
example! Discuss which language features in Java are used in order to achieve
orthogonality in log4j !
[4 marks]
b) What will be printed on the console if the following script is executed?
[2 marks]
Logger logger = Logger.getLogger("mylogger");
Appender appender = new ConsoleAppender(new SimpleLayout(),ConsoleAppender.SYSTEM_OUT);
logger.addAppender(appender);
logger.setLevel(Level.ERROR);
logger.error("error1");
logger.info("info1");
logger.warn("warn1");
logger.debug("debug1");
logger.setLevel(Level.DEBUG);
logger.error("error2");
logger.info("info2");
logger.setLevel(Level.INFO);
logger.warn("warn2");
logger.debug("debug2");
Page 4 of 9 COS
Question 3 – Testing [8 marks]
Assume you build a tax calculator library that has a method double distance(Point,Point)
that computes the distance between two points in space. The algorithm used only works
for points with non-negative coordinates, otherwise, an IllegalArgumentException is
thrown.
a) Let’s assume you have created test cases for 1,000 different input values using a
spreadsheet. All tests succeed, i.e., they calculate the expected value. Can you
conclude from this that distance(Point,Point) is correctly implemented ?
[2 marks]
b) Describe how you would use junit features to efficiently implement such a large
number of tests. Explain how this feature(s) works !
[2 marks]
c) The handling of negative input values is part of the specification of the
distance(Point,Point) method. How would you test this?
[2 marks]
d) An alternative to testing negative input values is to exclude them from all tests by
adding a precondition that the input values must be non-negative. Which junit
feature can be used to implement this, and how does this work ?
[2 marks]
Page 5 of 9 COS
Question 4 - Organising Code [4 marks]
Explain the advantages of convention over configuration using the Java getter and setter
convention !
Page 6 of 9 COS
Question 5 - Shell and Scripting [8 marks]
a) In a shell session, when you enter the command:
grep "abc" file.txt
It produces no output, indicating the command found no matches. How would you
determine if the same command was successful in a shell script?
[2 marks]
b) What are environment variables used for? List some commonly used environment
variables.
[1 marks]
c) With examples, explain the concepts of redirection and piping in the Unix shell.
[3 marks]
d) Permissions are used to control access to files. Describe the permissions for script.sh
in the following listing.
[2 marks]
cd ~
ls -l
-rw-rw-r-- script.sh
Page 7 of 9 COS
Question 6 - Source Code Management [8 marks]
a) What is the purpose of using a linter such as Checkstyle or a code formatter (e.g.
google-java-format) in collaborative software development?
[1 mark]
b) What is the key difference between an older version control system such as CVS
and Git?
[1 mark]
c) A development team has released the first version of a software, tagged the release
as v1 and it has been built and shipped to a set of customers. The developers are
now working on features for version 2. Meanwhile, a customer reports a bug for
version 1.
Explain how the developers would use Git (with git commands and commit graph)
during development, and to contribute a bugfix for version 1 and also to apply the
fix on version 2, release a patched version and ship to customer as v1.1 without the
newer features in v2
[6 marks]
Page 8 of 9 COS
Question 7 - Issue Tracking and Licensing [4 marks]
a) Describe how you would use an issue tracker in collaborative software
development and what information it records and tracks.
[3 marks]
b) What is the main difference between permissive licenses such as the BSD/MIT
license and the GPL, a copyleft license?
[1 marks]
Page 9 of 9 COS
Question 8 - Metrics [6 marks]
a) Discuss how lines of code metrics can be misleading in assessing developer
productivity
[2 marks]
b) Define logical, physical lines of code and cyclomatic complexity. For the sorting
method listed below in Java, calculate these metrics.
[4 marks]
public void bubbleSort(int[] arr) {
boolean swapped = true;
int j = 0;
int tmp;
while (swapped) {
swapped = false;
j++;
for (int i = 0; i < arr.length - j; i++) {
if (arr[i] > arr[i + 1]) {
tmp = arr[i];
arr[i] = arr[i + 1];
arr[i + 1] = tmp;
swapped = true;
}
}
}
}
+ + + + + + + +
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写math 1151, autumn 2024 w...
2024-11-14
代做comp4336/9336 mobile dat...
2024-11-14
代做eesa01 lab 2: weather an...
2024-11-14
代写comp1521 - 24t3 assignme...
2024-11-14
代写nbs8020 - dissertation s...
2024-11-14
代做fin b377f technical anal...
2024-11-14
代做ceic6714 mini design pro...
2024-11-14
代做introduction to computer...
2024-11-14
代做cs 353, fall 2024 introd...
2024-11-14
代做phy254 problem set #3 fa...
2024-11-14
代写n1569 financial risk man...
2024-11-14
代写csci-ua.0202 lab 3: enco...
2024-11-14
代写econ2226: chinese econom...
2024-11-14
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!