Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Summative Coursework Set Front Page

Module Title:   Programming in Java

Module Code:   CS2PJ20NU

Type of Assignment:   Programming – Demonstration / Report

Individual / Group Assignment: Individual

Weighting of the Assignment:   80%

Page limit/Word count:   4 pages/ See below

Expected hours spent for this assignment: Collection of weekly practice session

Items to be submitted:   Robot Simulation (80%)

December 26th (Boxing day!)

· A PDF of report

· A video of program

· A zip file of source code, Javadoc files

Work will be marked and returned: Usually mark is returned within 15 working days

NOTES

By submitting this work, you are certifying that it is all your own work and that use of material from other sources has been properly and fully acknowledged in the text. You are also confirming that you have read and understood the University’s Statement of Academic Misconduct, available on the University webpages.

If your work is submitted / demonstrated after the deadline, 10% of the maximum possible mark will be deducted for each working day (or part of) it is late. A mark of zero will be awarded if your work is submitted more than 5 working days late. You are strongly recommended to submit / demonstrate in by the deadline as one late piece of work can impact on other work.

If you believe that you have a valid reason for failing to meet a deadline then you should contact your tutor before the deadline, or as soon as is practicable afterwards, explaining why. 

1. Assessment classification

There is a detailed marking scheme for the final demonstration, and marks for correct submission of runnable code and documentation, as well as for the associated report. These reflect the general criteria as shown below.

Classification

Associated Criteria

First Class (>= 70%)

Strong technical knowledge and skill shown through development, proving a strong grasp of object orientation and advanced programming. Report is well structured and fluently written. Design choices are validated in the report, and the work is showing some research and novelty beyond the standard material.

Upper Second (60..70)

A solid grasp of the subject with a good selection of advanced programming methods. The report is well written and validates design choices. May show some elements of creativity and originality and makes use of existing literature to validate choices.

Lower Second (50..60)

A reasonable range of grasp of the subject, with few technical errors and written in plain English. On topic, relevant, and relatively well organised.

Third (40..50)

Evidence of appropriate study showing success in progress towards providing a solution with most technical content corrects. The work relies on simple examples or uses methods inconsistently.

Pass (30..40)

Shows some evidence of study, but may be largely unfinished, flawed, or irrelevant, whilst showing some attempt to present a coherent solution.

2. Assignment description

You are to develop a simulation of a variety of different robots and other objects moving round an arena and displayed this in a graphical user interface. You are free to add features to your Robot Simulation code.

2.1. Console version description

In sections 3, 4, and 5 you will develop the classes needed to create a simulation of robots moving around an area, displayed in a console window. The classes to be written are specified in detail in the lab sheets for these sections. The works are to be submitted as a formative assessment for the feedback.

2.2.  GUI version description

The work is inspired by the code written in sections 3, 4 and 5 of the console version in which you had only one type of robot moving around the arena in a console interface. However, in GUI version, you will need to do a proper object-oriented design with a suitable hierarchy of classes, including at least one abstract class.

You must utilise the JavaFx GUI library which you will learnt about in sections 6 and 7. The GUI should have menus, a toolbar with buttons and an information panel – as set out below.

Application Menu

The application should have a suitable menu, which allows the arena to be configured, saved and edited, that allows the simulator to run, and to provide help and instructions.  You can make design choices about the menu items, as long as you describe these choices in the design section of the report.

File Handling and Configuration

The application should allow the user to save and load simulation configurations from files. A configuration is defined as the set of parameters required to set up and start a simulation. By default, the simulator should load from a user defined configuration file, but if one is not there then a default arena with at least three robots or different items should be provided.

Toolbar

Also required is a toolbar with buttons to control the simulation (e.g., start, pause, add robots, etc.).

Information Panel

As the simulation runs, information should be provided on the state of the arena and its contents – these could be textual descriptions, but graphs or other displays may also be appropriate.

Classes and Inheritance

The classes for the console simulation were tightly specified, but you have more freedom for the GUI version, and so you should employ suitable design strategies. See below for hints.

The code should make use of at least one abstract class which is inherited directly or indirectly by other classes – the abstract class could be used by robots and other devices in the arena. Pay special attention to your use of inheritance and use access modifiers correctly. You should also have a class for the GUI, one for a canvas and one for the arena.

Animation

You can use any method, as long as you use JavaFX, to achieve the animation. In the console version, robots move either North, South, East or West. For the GUI version movement should not be constrained to these four directions – see the Ball examples.

Comments, documentation and version control

Your code should be professionally laid out and commented using Javadoc style comments.

Hints on Simulation

A rich simulation is expected, comprising a variety of robots with different behaviour and other items in the arena.

Robots could operate at different heights, and so when showing the arena, you draw all those at low levels, before those at higher ones. This could be done by repeatedly scanning through all the robots, until all have been drawn, but only drawing a robot if there is none below it – and then remembering it has been drawn. You could try drawing it in 3D if you wanted!

It is perhaps best to have a robot which is like that in the console, namely if it cannot move in its current direction because of a wall or another object, it turns. In effect it has a ‘bump’ sensor.

There should also be robots with different types of sensor – perhaps detecting obstacles a certain distance away. You could have sensors which detect lights, or even charging stations.

You could have obstacles in the way, and so a robot would have to steer to avoid an obstacle or rise up to go over it.

You could have robots which are predators of other robots.

You could have a robot which the user of the simulation controls.

You might find it easier if you make all robots/obstacles circular as it is easy to work out if they overlap. You can then use some of the concepts in the ball simulation.

You are free to give a game like theme e.g., robots in a war zone, a pizza delivery robot in a city,  or any other theme you may wish.

Key point

You must have at least one abstract class, possibly one which defines an object in the arena which all robots and other obstacles extend, or a robot abstract class which more sophisticated robots extend (as per the ball example).

It is important therefore that you do a full object-oriented design early on, before implementing the different robots. You must this submit the classes design in your report showing the hierarchy of classes you have implemented. See also comment below as regards the final report.

Suggested Development Plan

In sections 6 and 7 you will learn about using JavaFX and about inheritance, and in section 8 there is more detail on inheritance including the use of abstract classes. In the lab session in section 6, you learn about JavaFX and in section 7 model a simple solar system with planets and moons. At that stage you will know about developing a GUI, with menus, mouse clicks, buttons and animation.

In section 6 you should start the GUI version of the robot simulator. It is strongly suggested that you create a GUI, based on that in the solar system, but for robots. So have classes for GUI, canvas, robot arena and robot, and ensure that you have a robot which moves around the arena, perhaps turning when it reaches a wall of the arena, showing itself in the canvas of the GUI. Then have an array list of robots, and now the robots turn if they are about to encounter a wall or another robot. If you want to, have an abstract class for an item in the arena, which is inherited by your robot class. You could also have static obstacles which are in the class which if encountered by robots cause the robot to turn.

For the session in section 7, perform an object-oriented design covering the various robots and other obstacles that will be in your arena, including at least one abstract class. This could be similar to the figure on slide 5 of the “JavaWeek 9 AbstractClasses” powerpoint – showing the classes, key data and inheritance.

Implement some of the classes in section 8, and the rest in section 9, adding functionality such as file handling (for which it is recommended that you make your classes serializable so you can load or save an arena of robots in one go).

3. Assignment submission requirements

There are two mandatory submission points, 1- console version (20%) and 2- GUI version (60%).

3.1. Electronic submissions:

The following files which should be submitted to Blackboard are:

· A PDF of report

· A video of program

· A zip file of source code, Javadoc files

3.2. Hardcopy submissions:

Four pieces of paper should be printed and submitted to Miss Yi Qian:

· 1st piece of paper: front page only

· 2nd and 3rd piece of paper: REPORT (four pages, double-side print)

· 4th piece of paper: Self-assessment form (signed)

3.3. Video of your program

This should be a short, 5 min max, video of you demonstrating your program – show your program running. You should include the about and/or help which should show your student number. It is recommended that you show also the robots moving around, robots being added/deleted and if possible show the file handling. Ideally include sound of you explaining what is happening.

If you have an officially approved extenuating circumstance, then contact Dr Wenwen Liu by e-mail ([email protected]) to set up an alternative submission date/or alternative submission methods.

4. Marking scheme

This form will then be used when the zip file is assessed – the video will be used as appropriate to confirm the demonstration mark. In addition, a mark for the report will be added, based on the following marking scheme.

Area

Max Available Mark

Working Video + Javadoc files + Code files

3 + 3 + 3

Abstract

3

Introduction and Images of program

3

Class Hierarchy

3 for description 3 for suitability

Discussion of results

3

Reflection

4

Novel features

5

CS2PJ20NU Coursework JAVA: Report Mark Scheme

Page No.

Section

Mark

Page #1

Title

Abstract

Max 50 words overview of the entire project covering important features/results

10

Page #1

Section 1 – Introduction and Showcase

A short informal presentation of the application (screenshots with some description).

20

Page #2

Section 2 – OOP design

A short (a few sentences) descriptions of design document of the app (marks are also given for described unimplemented and/or unfinished features). Include:

• OOP design with a critical description of how the design aided you in the implementation.

• A statement on finished and unfinished classes.

20

Page #3

Section 3 –

A short (a few sentences) descriptions of your research about theme of your implementation

10

Page #3

Section 4 – Improvements/extensions

A short (a few sentences) descriptions If you researched and implemented and improvement above the other specifications then add a description of the work.

20

 

Page #4

Section 5 – Conclusions

A max 50 words summary of the important results and conclusions from throughout the rest of the document.  

 

Reference

10

 

Correctness of Submission

10

 

Total

                 /100

CS2PJ20NU Coursework JAVA: SELF-ASSESSMENT FORM

Print this out, fill in your own assessment in the first two column, print it out and submit it together with your report.

Your full name (PRINT):

 

Students own assessment

Students own assessment

Mark

By Assessor

1.

Overall OOP design, API and code style (2 marks each):

[ ] Following Java code conventions:

variable and class names

method names

indentation rules  

[ ] using inline developer comments,  

[ ] using Javadoc comments,

[ ] abstract class

[ ] good hierarchy for items in building

Overall OOP approach must be described in the report under the OOP design including abstraction, encapsulation, and information hiding choices. Appropriate use of inheritance, access modifiers for classes, attributes and methods (Information Hiding).

Show and described (3 marks each)

Number of Classes:

 

 

[ ] Inheritance used

 

Access modifiers check:

[ ] Correct

[ ] Less than 5 incorrect

[ ] More than 5 incorrect

[ ] Static variables and methods used correctly

0-25

2.

JavaFX GUI design and implementation: usability, robustness, quality, user-friendliness (1 mark each).

[ ] Crashes

[ ] Feedback to user instead of crashing or recover

[ ] Exception handling

[ ] Runs smoothly without interruptions

[ ] Lagging functionality

This must be described in the report

Design quality (2 marks each):

[ ] Professional looking

[ ] Understandable

[ ] Toolbar buttons

[ ] Menu

[ ] File handling

0-15

3.

Animation: and control  (2 marks each):

[ ] Animation attempted but not fully working

[ ] Animation works with Start and Stop

[ ] Controlled using Menu control

[ ] Has Toolbar buttons

[ ] Overall innovation

Comments:

0-10

4.

Arena: does it support different entities (4 marks each)

[ ] Robots which turn when meet walls/robots/objects

[ ] Objects which don’t move

[ ] Robots with additional sensors

[ ] Panel listing arena contents

[ ] A proper theme used

Design must be described in the report

Total number of different types in arena (10 marks):

 

 

Any other feature(s) (10 marks):

0-40

6

Bonus marks for innovation / outstanding features

Academic Evaluation

10

Total

           /100

 

 

Signature of student

Signature of Assessor

Date

Date