Java程序设计代写 Supplied Material This task sheet. Code specification document (Javadoc).² Gradescope, an online website where you will submit your assignment.³
or freight, or refueling the aircraft. The total weight of an aircraft can change depending on the occupancy level (passengers or freight) of the aircraft (for example, more passengers means the aircraft will be heavier).
Each aircraft also has a list of tasks that it completes. Tasks represent the actions or states that an aircraft can take including: being away from the airport (for assignment simplicity we only care the aircraft is in an away state, we do not care what it might be doing in this time), waiting to land, waiting to take off, loading (i.e. passengers or freight), and waiting idle at the gate. Tasks can take different amounts of time depending on characteristics of the aircraft, and the requirements of each recorded task (for example, loading takes longer when there are more passengers or freight).
The list of tasks which an aircraft has must follow a strict set of requirements. The tasks can only occur in a specific order (for example, it would not make logical sense to be waiting in the air in a landing queue, and then takeoff – the aircraft must land first). Aircraft also complete a task list in a circular manner. Once the aircraft has completed the last task in the list, it will then commence the first task in the list again. This behaviour will go on forever (this simplification of aircraft behavior is for assignment simplicity. A real aircraft would have much more complex schedules, but this is way beyond the scope of this course).
Supplied Material Java程序设计代写
This task sheet.
Code specification document (Javadoc).2
Gradescope, an online website where you will submit your assignment.3
An empty assignment solution (i.e. skeleton code) is provided in your Subversion repository. These files provide a minimal framework for you to work from, and build upon. These files have been provided so that you can avoid (some of) the critical mistakes described in the Appendix. Each of these files:
– is in the correct directory (do not change this!)
– has the correct package declaration at the top of the file (do not change this!)
– has the correct public class or public interface declaration. Note that you may still need to make classes abstract, extend classes, implement interfaces etc. as detailed in the specifications.
As the first step in the assignment (after reading through the specifications) you should checkout the ass1 repository from Subversion. Once you have created a new project from the repository you have checked out, you should start implementing the specifications.
2 Detailed in the Javadoc section
3 Detailed in the Submission section
Code specifications are an important tool for developing code in collaboration with other people. Although assignments in this course are individual, they still aim to prepare you for writing code to a strict specification by providing a specification document (in Java, this is called Javadoc).
You will need to implement the specification precisely as it is described in the specification document.
The Javadoc can be viewed in either of the two following ways:
- Open https://csse2002.uqcloud.net/assignment/1/ in your web browser. Note thatthis will only be the most recent version of the Javadoc.
- Navigate to the relevant assignment folder under Assessment on Blackboard and you will be able to download the Javadoc .zip file containing HTML documentation. Unzip the bundle somewhere, and open doc/index.html with your web browser.
- Fully implement each of the classes and interfaces described in the Javadoc.
- Write JUnit 4 tests for all the methods in the following classes:
- Gate (in a class called GateTest)
- TaskList (in a class called TaskListTest)
The 100 marks available for the assignment will be divided as follows:
|F T||45||Electronically||Functionality according to the specification|
|CF||10||Electronically||Conformance to the specification|
|SL||10||Electronically||Code Style: Structure and Layout|
|CR||20||By course staff||Code Style review: (Style and Design)
|JU||15||Electronically||Whether JUnit tests identify and distinguish between correct and incorrect implementations|
The overall assignment mark will be A1 = F T + CF + SL + CR + JU with the following adjustments:
- If F T is 0, then the manual code style review will not be marked. CR will be automatically 0.
- If SL is 0, then the manual code style review will not be marked. CR will be automatically 0.
- If SL + CR > FT, then SL + CR = F T.
For example: F T = 22,CF = 8,SL = 7,CR = 18, J = 13
⇒ A1 = 22 + 8 + (7 + 18) + 13.
The reasoning here is to place emphasis on good quality functional code.
Well styled code that does not implement the required functionality is of no value in a project, consequently marks will not be given to well styled code that is not functional.
Conformance is marked starting with a mark of 10.
Every single occurrence of a conformance violation in your solution then results in a 1 mark deduction, down to a minimum of 0. Note that multiple conformance violations of the same type will each result in a 1 mark deduction.
Conformance violations include (but are not limited to):
- Placing files in incorrect directories.
- Incorrect package declarations at the top of files.
- Using modifiers on classes, methods and member variables that are di↵erent to those specified in the Javadoc. Modifiers include private, protected, public, abstract, final, and static. For example, declaring a method as public when it should be private.
- Adding extra public methods, constructors, member variables or classes that are not described in the Javadoc.
- Incorrect parameters and exceptions declared as thrown for constructors.
- Incorrect parameters, return type and exceptions declared as thrown for methods.
- Incorrect types of public fields.
Code Style Java程序设计代写
Code Structure and Layout
The Code Structure and Layout category is marked starting with a mark of 10.
Every single occurrence of a style violation in your solution, as detected by CheckStyle using the course-provided configuration 4, results in a 0.5 mark deduction, down to a minimum of 0. Note that multiple style violations of the same type will each result in a 0.5 mark deduction.
Note: There is a plugin available for IntelliJ which will highlight style violations in your code. Instructions for installing this plugin are available in the Java Programming Style Guide on Black-board (Learning Resources ! Guides). If you correctly use the plugin and follow the style requirements, it should be relatively straightforward to get high marks for this section.
4 The latest version of the course CheckStyle configuration can be found at http://csse2002.uqcloud.net/checkstyle.xml. See the Style Guide for instructions.
Your assignment will be style marked with respect to the course style guide, located under Learning Resources → Guides. The marks are broadly divided as follows:
Note that style marking does involve some aesthetic judgement (and the marker’s aesthetic judgement is final).
Note that the plugin available for IntelliJ mentioned in the Code Structure and Layout section cannot tell you whether your code violates style guidelines for this section. To do so, it would need complex AI capabilities, which is not realistic. You will need to manually check your code against the style guide.
The Code Review is marked starting with a mark of 20. Penalities are then applied where applicable, to a minimum of 0.
JUnit Test Marking
See Appendix B for more details.
The JUnit tests that you provide in GateTest and TaskListTest will be used to test both correct and incorrect implementations of the Gate and TaskList classes. Marks will be awarded for test sets which distinguish between correct and incorrect implementations 5. A test class which passes every implementation (or fails every implementation) will likely get a low mark. Marks will be rewarded for tests which pass or fail correctly.
There will be some limitations on your tests:
- If your tests take more than 20 seconds to run, or
- If your tests consume more memory than is reasonable or are otherwise malicious,
then your tests will be stopped and a mark of zero given. These limits are very generous (e.g. your tests should not take anywhere near 20 seconds to run).
5 And get them the right way around
Electronic Marking Java程序设计代写
The electronic aspects of the marking will be carried out in a Linux environment. The environment will not be running Windows, and neither IntelliJ nor Eclipse (or any other IDE) will be involved.
OpenJDK 11 will be used to compile and execute your code and tests.
It is critical that your code compiles.
If your submission does not compile, you will receive zero for Functionality (FT).
How/Where to Submit
Submission is via Gradescope (submission is not via SVN repository like in previous semesters).
Instructions for submitting to Gradescope will be made available on Blackboard (under Assessment → Assignment 1) towards the start of week 4. You will not be able to submit your assignment before then.
You must ensure that you have submitted your code to Gradescope before the submission deadline. Code that is submitted after the deadline will not be marked (1 nanosecond late is still late).
What to Submit Java程序设计代写
Your submission should have the following internal structure:
src/ folders (packages) and .java files for classes described in the Javadoc test/ folders (packages) and .java files for the JUnit test classes
A complete submission would look like:
src/towersim/aircraft/Aircraft.java src/towersim/aircraft/AircraftCharacteristics.java src/towersim/aircraft/AircraftType.java src/towersim/aircraft/FreightAircraft.java src/towersim/aircraft/PassengerAircraft.java src/towersim/control/ControlTower.java src/towersim/ground/AirplaneTerminal.java src/towersim/ground/Gate.java src/towersim/ground/HelicopterTerminal.java src/towersim/ground/Terminal.java src/towersim/tasks/Task.java src/towersim/tasks/TaskList.java src/towersim/tasks/TaskType.java src/towersim/util/EmergencyState.java src/towersim/util/NoSpaceException.java src/towersim/util/NoSuitableGateException.java src/towersim/util/OccupancyLevel.java src/towersim/util/Tickable.java test/towersim/ground/GateTest.java (must be test directory, not src!) test/towersim/tasks/TaskListTest.java (must be test directory, not src!)
Ensure that your classes and interfaces correctly declare the package they are within. For example, Gate.java should declare package towersim.ground.
Do not submit any other files (e.g. no .class files).
Note that GateTest and TaskListTest will be compiled individually against a sample solution without the rest of your test files.
Provided set of unit tests
A small number of the unit tests (about 10-20%) used for assessing Functionality (FT) (not conformance, style, or JUnit tests) will be provided in Gradescope prior to the submision deadline, which you will be able to test your submission against.
The purpose of this is to provide you with an opportunity to receive feedback on whether the basic functionality of your classes is correct or not. Passing all the provided unit tests does not guarantee that you will pass all of the full set of unit tests used for functionality marking.
Instructions about the provided set of unit tests will be made available on Blackboard (under Assessment → Assignment 1) towards the start of week 4. Instructions will not be provided before then. This will still give you over two weeks to submit and check your work before the assignment is due.
Late Submission Java程序设计代写
Assignments submitted after the submission deadline of 16:00 on April 1 2021 (by any amount of time), will receive a mark of zero unless an extension is granted as outlined in the Electronic Course Profile — see the Electronic Course Profile for details.
Do not wait until the last minute to submit the final version of your assignment. A submission that starts before 16:00 but finishes after 16:00 will not be marked. Exceptions cannot be made for individual students, as this would not be fair to all other students.
For assignment one, extensions longer than 7 calendar days will not be possible due to the dependency of assignment two on the work completed in assignment one. This matches what is outlined in the respective Electronic Course Profile.
All requests for extensions must be made via my.UQ as outlined in section 5.3 of the respective Electronic Course Profile. Please not directly email the course coordinator seeking an extension (you will be redirected to my.UQ).
To submit a remark of this assignment please follow the information presented here:
If it becomes necessary to correct or clarify the task sheet or Javadoc, a new version will be issued and an announcement will be made on the Blackboard course site.
Appendix A: Critical Mistakes which can cause loss in marks. Java程序设计代写
Things you need to avoid!
This is being heavily emphasised here because these are critical mistakes which must be avoided.
The way assignments are marked has been heavily revised this semester to address many of these issues where possible, but there are still issues which can only be avoided by making sure the specification is followed correctly.
Code may run fine locally on your own computer in IntelliJ, but it is required that it also builds and runs correctly when it is marked with the electronic marking tool in Gradescope. Your solution needs to conform to the specification for this to occur.
Correctly reading specification requirements is a key objective for the course. Java程序设计代写
- Files must be in the exact correct directories specified by the Javadoc. If files are in incorrect directories (even slightly wrong), you may lose marks for functionality in these files because the implementation does not conform to the specification.
- Files must have the exact correct package declaration at the top of the file. If files have incorrect package declarations (even slightly wrong), you may lose marks for functionality in these files because the implementation does not conform to the specification.
- You must implement the public and protected members exactly as described in the supplied documentation (no extra public/protected members or classes). Creating public or protected data members in a class when it is not required will result in loss of marks, because the implementation does not conform to the specification.
– Private members may be added at your own discretion.
- Never import the org.junit.jupiter.api package. This is from JUnit 5. This will auto matically cause the marks for the JUnit section to be 0 because JUnit 5 functionality is not supported.
- Do NOT use any version of Java newer than 11 when writing your solution! If you accidentally use Java features which are only present in a version newer than 11, then your submission may fail to compile when marked. This will automatically cause the marks for associated files with this functionality to be 0.
Appendix B: How your JUnit unit tests are marked. Java程序设计代写
The JUnit tests you write for a class (e.g. GateTest.java) are evaluated by checking whether they can distinguish between a correct implementation of the respective class (e.g. Gate.java) (made by the teaching staff), and incorrect implementations of the respective class (deliberately made by the teaching staff).
First, we run your unit tests (e.g. GateTest.java, TaskListTest.java) against the correct implementation of the respective classes (e.g. Gate.java, TaskList.java).
We look at how many unit tests you have, and how many have passed. Let us imagine that you have 5 unit tests (it should be more than this, 5 is just an example) for GateTest.java and 4 unit tests (it should be more than this, 4 is just an example) for TaskListTest.java, and they all pass (i.e. none result in Assert.fail() in JUnit4).
We will then run your unit tests in both classes (GateTest.java, TaskListTest.java) against an incorrect solution implementation of the respective class (e.g. Gate.java). For example, the getGateNumber() method in the Gate.java file is incorrect.
We then look at how many of your unit tests pass.
TaskListTest.java should still pass 5 unit tests. However, we would expect that GateTest.java would pass less than 4 unit tests.
If this is the case, we know that your unit tests can identify that there is a problem with this specific implementation of Gate.java.
This would get you one identified faulty implementation towards your JUnit mark.
The total marks you receive for JUnit are the correct number of identified faulty implementations, out of the total number of faulty implementations which the teaching staff create.
If your unit tests identified 60% of the faulty implementations, you would receive a mark of: 60% of 15 → 9/15.