CSC1035 “Programming Portfolio 2”
Coursework Part 1
This work is due for electronic submission thorough NESS. It represents an individual assignment (no group work) and can be carried out during independent study and during weekly practical classes.
This is the first part of the module’s coursework, which constitutes 30% of the final module mark.
1. Objectives
The objectives of this coursework are for you to demonstrate that you can:
- Define classes, fields, constructors, and methods in Java
- Use appropriate types, including collections
- Implement basic algorithms using collections
- Write a main method including console I/O
- Devise appropriate testing examples
- Document your solution with javadoc
Note that at the time of setting the coursework, you will not have been taught all the material relevant to this exercise (for example, main method, console I/O, testing). You may need to research relevant Java Class libraries in order to gethelp with certain features.
2. Scenario: Crime reporting
In order to help police to plan resources and give the general public information about burglaries in their local area, a crime reporting system is to be developed. Burglaries, referred to as Incidents, will be recorded at a particular postcode location and will record a value of the goods stolen. Different areas of the country, referred to as Districts, will collect data so that they can summarise by number of incidents.
Make use of correct version control practice for the development of this project. This includes: professional and relevant commits and commit messages, and a .gitignore file that excludes project configuration information
3. Problem specification and mark scheme
Define a Java class Incident with appropriate fields, methods and constructor to store and retrieve information about the value, postcode, the month and the year in which the crime was reported.
Define a Java class District with appropriate fields, methods and constructor to store and retrieve the name of the local district, and a list of burglary incidents that it has recorded. Include methods to return:
- The incident with the highest value recorded in the district .
- The average incident value recorded in the district in a given year.
- A list of all incidents recorded in the district with a value greater than a given amount of money.
Define a Java class Reporting, which holds information about all districts. Include methods to return:
- The district with the largest average value incident for a given year.
- The largest value incident ever recorded.
- A list of all incidents recorded with value greater than a given amount of money.
Define a class ReportingIO, with a main method which does the following:
- Presents the user with a menu (printed to the console) offeatures:
- enter District data;
- enter Incident data;
- provide reporting statistics on: district with largest average value incident for a given year, highest incident ever reported, and all incidents with value greater than a given amount; or
- exit
- Takes user input from the console to choose one of the menu features
- Allows the user to input, via the console, the details of districts and incidents
- After executing one of the features, returns the user to the menu to choose another option
All classes should be properly documented with javadoc and include appropriate testing examples.
4. What to submit
You must submit 1 zip file to Ness, as follows:
- A zip file named ‘CSC1035_coursework_pt1_2021_FirstnameLastname.zip’, where ‘Firstname’ is replaced with your first name, and ‘Lastname’ is replaced with your last name. The zip file must contain:
- The source code of your Java classes.
- The generated javadoc for your classes.
- A REPO.txt file with the NUCode URL of your last commit (“HEAD”) (please ensure that the URL includes a Git hash)
- A PDF document named ‘CSC1035_coursework_pt1_2021_FirstnameLastname.pdf’ following the same conventions as above, containing a reflective commentary on your implementation (approx.. 500 words), saying what went well and what you would do to improve or extend your program. This report should also talk about the use of version control throughout the development of the project.
5. Mark Scheme
The coursework is marked out of 100 and accounts for 30% of the module mark.
80% for the code, testing and Javadoc. 20% for the reflective report. The breakdown of the code percentage are as follows:
- Incident Class: 10%
- District Class: 15%
- Reporting Class: 20%
- ReportingIO Class: 20%
- Javadoc: 5%
- Testing: 10%