COMP6018 Advanced Object Oriented Programming


Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due


COMP6018 Advanced Object Oriented Programming

STUDENTS, PLEASE COPY THIS PAGE AND USE AS THE COVER PAGE FOR YOUR SUBMISSION

Module No: COMP 6018 

Module title: Advanced Object-Oriented Programming

Assessment title : Battleships
Due date and time: 2 nd May 2025 at 1pm
Estimated total time to be spent on assignment: 65 hours per student (excludes 52 hours for independent / directed study)
LEARNING OUTCOMES
On successful completion of this module, students will be able to achieve the module following learning outcomes (LOs): LO numbers and text copied and pasted from the module descriptor.
LO2 Create a software artefact by applying the methodologies of advanced object oriented programming to a requirements specification
LO4 Consult on-line code libraries to find the classes and methods most appropriate for solving a particular problem
LO5 Create appropriate documentation that clearly communicates the intended behaviour of a program
Engineering Council AHEP4 LOs assessed (from S1 2022-23):
C1 Apply knowledge of mathematics, statistics, natural science and engineering principles to the solution of complex problems. Some of the knowledge will be at the forefront of the particular subject of study
C2 Analyse complex problems to reach substantiated conclusions using first principles of mathematics, statistics, natural science and engineering principlesSchool of Engineering, Computing & Mathematics
C3 Select and apply appropriate computational and analytical techniques to model complex problems, recognising the limitations of the techniques employed
C4 Select and evaluate technical literature and other sources of information to address complex problems
C5 Design solutions for complex problems that meet a combination of societal, user, business and customer needs as appropriate. This will involve consideration of applicable health & safety, diversity, inclusion, cultural, societal, environmental and commercial matters, codes of practice and industry standards
Statement of Compliance (please tick to sign)

I declare that the work submitted is my own and that the work I submit is fully in accordance with the University regulations regarding assessments (www.brookes.ac.uk/uniregulations/current)School of Engineering, Computing & Mathematics Marking grid is attached at the end of this assignment.

ASSIGNMENT IN DETAIL: INTRODUCTION

For this coursework, you will produce two versions of the one-player game of Battleships1 . One version will have a Graphical User Interface (GUI) and the other version will have a command-line interface (CLI). The GUI version will be constructed according to the principles of Model View Controller, and the CLI version will use the same model. The two versions will from now on be called the GUI version and the CLI version

ASSIGNMENT IN DETAIL: HOW TO PLAY Battleships

Battleships is a game in which a (human) player must guess the locations of ships that the computer has secretly arranged on a 10 × 10 grid. Each ship occupies several consecutive squares and may be arranged either vertically or horizontally. There are various types of ship, each composed of a different number of squares. These are shown in red below.

Once the player has guessed a location for part of a ship, they are told whether the guess was a hit or a miss. When all parts of a ship have been hit, the ship is sunk. When all the ships are sunk, the game ends and the player is told how many tries they needed.

What the player will see is not the locations of the ships but the locations of the attempts they have made. In the diagram these are indicated by Xs but you must indicate whether they are hits or misses by labelling them as either H for hit or M for miss. You may use symbols or a graphical notation instead for aesthetic reasons so long as the meaning is clear.

ASSIGNMENT IN DETAIL: FUNCTIONAL REQUIREMENTS

FR1
The GUI and CLI versions will both show a 10 × 10 grid indicating for each location that the user has tried whether that was a hit or a miss.
FR2
The player selects a grid location for the GUI version by clicking on it.
FR3
The player selects a grid location for the CLI version by entering an upper case alphanumeric string eg A1, J10 according to the row and column labels.
FR4
There is one ship of length 5, one of length 4, one of length 3 and two of length 2 and none of length 1.
FR5
Ships may be adjacent to one another but cannot intersect.
FR6
The board must be secretly arranged by the computer at the start in accordance with FR4 and FR5. You may use a hard-coded board for this initially but note FR7.
FR7
In both versions, it is possible for the user to load in a text file with a configuration of ships in accordance with FR4 and FR5. You can design any text file format that fits FR4 and FR5. An error message will be shown if the text file does not conform to the format.
FR8
Both versions must indicate when a whole ship is sunk and should at the end of the game report how many tries were needed to sink the whole fleet.
ASSIGNMENT IN DETAIL: NON-FUNCTIONAL REQUIREMENTS

NFR1
The GUI version must be constructed according to the principles of MVC, as restated below.
NFR2
The CLI version will use the Model part of the GUI version directly without using the View or Controller; nor should it define a new view or controller.
NFR3
The code must be documented with asserts, unit testing, class diagram, comments as described below.
NFR4
The code must be of good quality as described below.
 FORMATIVE FEEDBACK OPPORTUNITIES

We are giving you the opportunity to receive feedback on the design of your program. To receive this feedback, you need to upload a detailed UML class diagram of your code to your GitHub repository before 1pm on Friday March 1 st. As this is a formative feedback deadline, it will not be possible for you to seek deadline extensions. You will be given a few sentences of written feedback on your design within a week. The Week 5 teaching session on Monday February 26 th will go through a worked example in order to help you produce the class diagram.

The class diagram should have all methods and attributes showing. A class diagram with insufficient detail or syntactically nonsensical or not realisable as an actual Java program will make it more difficult for us to give you feedback and will receive a low mark if submitted with the final report.

Further advice will be given in the module leader’s or practical tutor’s office hours or at the end of practicals or lectures. Your commits so far to the GitHub repository will be used to give advice.

SUMMATIVE FEEDBACK DELIVERABLES

Deliverable description and instructions

1. Your code will be uploaded to the GitHub repository as regular commits a long time in advance of the deadline. In addition
2. Upload a Word document or PDF which must:
  • begin with the URL of your video
    • uploaded to Google Drive
    • permissions set so that anybody in Google@Brookes with the URL can view it
    • The video should show the CLI version first and then the GUI version from choice of your IDE
  • contain the class diagram
  • containing your explanation on Model, View and Controller components. The approach should explain the CLI and GUI versions clearly. This section should not exceed 2 pages of your report.
  • contain the code as text not images
  • be submitted to the Turnitin link provided.
3. You may be asked to attend a demonstration on Zoom to answer questions about the video and if you are then you must do so.
Weighting out of 100%
Code for Model (in repository and report):
This should have an interface designed to be convenient for the Controller, View and JUnit class to use with no superfluous public methods, no references to those three classes and contain no GUI code. It may consist of several classes but there must be a class called Model or similar that provides the interface and this class should extend Observable.
15%
Code for Controller (in repository and report):
This should forward only valid requests to the Model, querying the Model if necessary tofind out if the request is valid, and must also enable / disable any buttons needed toimplement the above functional requirements. It must have no GUI code, though it maysend messages to the View.
5%

View using the Swing framework (in repository and report):
It should implement Observer and therefore have an update method that is called whenthe Model changes. This will be marked according to how many of the functionalrequirements have been met.
10%
CLI version of program, using the Model (in repository and report):
A single class using the Model which when run implements the same functionalrequirements as the GUI except that all of the information about each square should be recorded in a separate line of text rather than mimicking the ring structure shown in thediagram.
10%
Specification of Model with asserts (in repository and report):
This should include invariants for the class as well as pre and post conditions for eachpublic method in the model and should preferably be in logic with partial credit for descriptions in English.
10%
Unit testing of the Model in JUnit (in repository and report):
There should be three tests, significantly different from each other. You should explain in the comments the scenario i.e. the situation you are testing for. You should use write (andthen call) methods for the Model that set it into the state desired for the test. It should beeasy to see what state the Model is being set to by reading the code for the unit tests. Your Model may use a separate Board class but the testing should be of the Model class andthe specification should be applied to that class also.
10%
Code quality (in repository and report):
Use of the code quality practices described in Lecture/practical 1, plus the additionalpractices of light relevant commenting and correct formatting. Short elegant programs are preferred, and code smells are to be avoided. Note that high marks for this category willonly be possible if the GUI fulfils most of the requirements.
10%
Class diagram (in report):
This should show how the Model, View and Controller are related to each other, as well ashow they interact with library classes such as Observable. Simplicity and clarity will be rewarded. It will be marked according to its accuracy as a representation of the program.
10%
Video (URL in report):

Five-minute video that shows you using the program. It will be marked according to timing, presentation and how well you show that you have met the FRs and NFRs in both versions.

If the marker has any questions about the video, then you will be invited to a Zoom presentation.

10%
GitHub Commits (in repository):
You must make regular commits to the GitHub repository that you will be given.
10%

This is an individual piece of work and you will have to work on your own and submit your own original attempt at the assignment. Any code that has been copied from any source (e.g. Stack Overflow, online tutorial, textbooks, other students etc.) must be properly referenced to avoid any suspicion of plagiarism. If you need help you can always ask for advice and guidance from the module leader by email; online sessions can be arranged for further clarification. You cannot use any kind of AI.COMP6018 Advanced Object Oriented Programming

Coursework

The coursework will be marked according to the following rubric:


F
P
B/C
A+
Model 15%
only basic functionality implemented or slightly more than basic but references to View or Controller or superfluous methods
no superfluous methods and no references to View or Controller but only the basics of functionality implemented
no superfluous methods and no references to View or Controller but only the basics of functionality implemented
convenient to use with no superfluous methods, all required functionality and no references to View or Controller, extends Observable, calls setChanged and notifyObservers
Controller 5%
zero of the requirements: only valid requests, querying Model first, enables/disables buttons without GUI code
one out of only valid requests, querying Model first, enables/disables buttons without GUI code
two out of only valid requests, querying Model first, enables/disables buttons without GUI code
only valid requests, has references to both Model and View, converting UI interactions into methods to change the Model, querying Model first, enables/disables buttons without GUI code
GUI View 10%
no view update method or update method implementing very few of the FRs
update method in view implementing some of the FRs
update method in view implementing most of the FRs
update method in view implementing all the FRs, uses Swing, has Model and Controller as attributes, displays board and allows Controller to change the view e.g. enable/disable options, implements Observer and calls addObserver
CLI class 10%
CLI version implementing very few of the FRs
CLI version implementing some of the FRs
CLI version implementing most of the FRs
CLI version implementing all of the FRs, using same Model as the GUI version, but no Controller and is demonstrated on the video 
Specificati on of Model with asserts 10%
a few pre/post conditions described in English
suitable pre/post conditions for most public methods but in English
suitable pre/post conditions for most public methods expressed in some logic
suitable pre/post conditions for all public methods and class invariants all expressed as statements of formal logic 
Unit testing of Model with JUnit 10%
one test with the scenario poorly described or not at all 
tests all essentially similar or only one or two or scenario being tested poorly described
third test not significantly different or scenario being tested not described with sufficient care
three significantly different tests of the model with all scenarios exactly described and with all inputs satisfying the preconditions
Code quality practices 10%
most code quality practices not observed or program is too small to demonstrate good code quality practices
some code quality practices observed but many not or program is too small to demonstrate good code quality practices
most code quality practices observed but some clearly not
all code quality practices observed including light correct commenting, suitable identifier names (constants, methods, classes etc) in appropriate cases, indentation, lack of code smells (long methods, repeated code, lack of modularity)
Class diagram 10%
Inadequate class diagram with serious mistakes in attributes and relationships between classes
Adequate class diagram with mistakes in both attributes and relationships between classes
Good class diagram with only a few mistakes in attributes, visibility or relationships between classes
Excellent class diagram with all attributes indicated with correct visibilities and correct relationships between classes all shown
Video Presentati on 10%
Very poor presentation with insufficient coverage of FRs and NFRs, poorly presented and overly long
Passable presentation covering FRs or NFRs or well-presented or at least appropriate length
Quite good presentation but missing some details of FRs and NFRs or poorly presented or overly long
Excellent presentation with full explanation of most FRs and NFRs, well presented and within time limit
GitHub 10%
Some minimal code in the repository
Updates to the repository but mostly for the last few days before submission
Evidence of regular updates to the repository over a period of several weeks
Clear pattern of regular updates over a period of two months according a clear version policy with informative commit messages

发表评论

电子邮件地址不会被公开。 必填项已用*标注