首页 > > 详细

辅导留学生Java语言、Java程序讲解、讲解Java、Electronic Marking编程

Abstract
In this assignment you will add classes and methods to a base set developed in Assignment 1.
As before, you are to implement exactly the public and protected aspects described in the javadoc.
Also as before, you may add private members as you see t.
Note that you may also add nested or private/package private helper classes if you wish.
For some items in the javadoc you will need to write them from scratch, for others, you will be
given code which you may need to add extra features to (See below). In those cases, you are not
to modify any supplied methods.
Language requirements: Java version 1.8, JUnit 4
Preamble
All work on this assignment is to be your own individual work. As detailed in Lecture 1, code supplied
by course sta is acceptable but there are no other exceptions.
You are expected to be familiar with \What not to do" from Lecture 1 and
If material is found to be \lacking academic merit", that material may be removed from your
submission prior to marking1.
If you have questions about what is acceptable, please ask.
Supplied material
This task sheet
A .zip le containing html documentation (javadoc) for the classes you are to write. Unzip the
bundle somewhere and start with doc/index.html.
A .zip le containing supplied source code for you to build on. Do not modify the supplied
les except to add required methods. Note that the supplied code will require you to implement
DigException before it will compile.
Tasks
1. Implement the following classes and all described methods:
(a) DigException
(b) Pair
(c) O TheMapException
(d) RoomExistsException
(e) MapWalker
(f) BoundsMapper
(g) MapIO
1No attempt will be made to repair any code breakage caused by doing this.
1
2. Implement the following methods:
(a) Room.makeExitPair
(b) Builder.digExit
3. Declare repr in Thing.
4. Implement repr() in the following classes: Critter, Builder, Explorer, Treasure.
5. Implement decode() in the following classes: Builder, Explorer, Critter, Treasure.
6. Write JUnit4 tests for the methods in the following classes:
MapIO as MapIOTest
BoundsMapper as BoundsMapperTest
Marking
The 100 marks available for the assignment will be divided as follows:
Symbol Marks Marked Description
F 55 Electronically Implementation and functionality:
Does the submission conform. to the documentation?
S 25 By \humans" Style. and clarity.
J 20 Electronically Student supplied JUnit tests:
Do the tests correctly distinguish between correct and incorrect
implementations?
The overall assignment mark will be A2 = F + S + J with the following adjustments:
1. If F F, then S = F.
3. If J > F, then J = F.
For example: F = 22;S = 25;J = 17)A2 = 22 + 22 + 17.
The reasoning here is not to give marks to cleanly laid out classes which do not follow the speci -
cation.
Functionality marking
The number of functionality marks given will be
F = Tests passedTotal number of tests 55
Each of your classes will be tested independently of the rest of your submission. Other required
classes for the tests will be copied from a working version.
Functionality testing does not apply to your JUnit tests.
2
Style. marking
As a style. guide, we are adopting2 the Google Java Style. Guide
https://google.github.io/styleguide/javaguide.html with some modi cations:
4.2 Indenting is to be +4 chars not +2.
4.4 Column limit for us will be 80 columns.
4.5.2 First continuation is to be +8 chars.
There is quite a lot in the guide and not all of it applies to this course (eg no copyright notices).
The marks are broadly divided as follows:
Naming 5
Commenting 6
Structure and layout 10
Good OO implementation practices 4
Note that this category does involve some aesthetic judgement (and the marker’s aesthetic judge-
ment is nal).
Test marking
Marks will be awarded for test sets which distinguish between correct and incorrect implementations3.
A test class which passes everything (or fails everything) will likely get a low mark.
When testing loadMap and saveMap you should test single room cases separately but for multiple
room cases, test them together.
There will be some limitations on your tests:
1. If your tests take more than 20 seconds to run, they will be stopped and a mark of zero given.
2. Each of your test classes must be less than 300 (non-empty) lines. If not, that test will not be
used.
These limits are very generous, (eg your tests shouldn’t take anywhere near 20 seconds to run).
Electronic Marking
The electronic aspects of the marking will be carried out in a virtual machine or linux box. The VM
will not be running windows and neither IntelliJ nor Eclipse will be involved. For this reason, it is
important that you name your les correctly.
It is also critical that your code compiles. If one of your classes does not compile, you will recieve
zero for any electronically derived marks for that class.
Submission
Submission is via the course blackboard area Assessment/Ass2/Ass2 Submission.
Your submission is to consist of a single .zip le with the following internal structure:
src/ .java les for classes described in the javadoc
test/ .java les for the test classes
Note: you must submit supplied classes as well.
Your classes must not declare themselves to be members of any package. Do not submit any other les
(eg no .class les). Any les or directories which do not match the above structure will be deleted
before marking. Remember that java lenames are case sensitive even when your lesystem isn’t.
2There is no guarantee that code from lectures, pracs and tutes complies.
3And get them the right way around
3
Late submission
See the ECP for rules and penalties regarding late submission. Note that, for example, that submitting
at 2am on 5th of May would incur a 30% penalty.
Revisions
If it becomes necessary to correct or clarify the task sheet or javadoc, a new version will be issued and
a course announcement will be made on blackboard. No changes will be made on or after 2018-04-30.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!