Java代写 | SCC110: Software Development Term 3

本次Java代写是完成一个桌球游戏
SCC110: Software Development Term 3. Programming Project.  
Project Title:  
Programming Project  
Moodle Submission Deadline: 16:00 Friday Week 25  
Assessment Mode:  
Continual Assessment via SCC110 Git Server  
Aims  
In this final term of your first year, there is a single task – a project that is designed to bring together  
many of the programming techniques that you have learned over the year. This project represents  
the final piece of practical coursework for SCC110. Following the University’s decision to cancel the  
2
020 exam cycle due to impacts of the COVID-19 pandemic, this coursework also represent the final  
piece of assessment for SCC110. So it’s time to show us what you can do!  
You have a choice of projects to undertake, to be selected from the three choices below, and you  
need to pick just one of these projects. Read each of them carefully before choosing which project  
to undertake. Please note that the projects state which programming language you must use for that  
project (either C or Java).  
Getting Support  
Due to the ongoing impacts of the COVID-19 pandemic, the University is moving to an alternative  
mode of delivery for Summer Term teaching. As such, we will be replacing the face-to-face studio  
sessions that we would normally use to support the SCC110 term 3 project with online sessions.  
We will be running online SCC110 support sessions every weekday between 10:00 and 12:00 (UK  
time) in weeks 21-25 inclusive. Individual one-on-one support sessions are possible through these  
sessions. Staff and/or teaching assistants will be present at these times to answer your questions  
and provide feedback on your work via Microsoft Teams, which can be accessed through the SCC110  
Team page:  
Please use the Teams page for support, and DO NOT ask for support via email. Personal email does  
not scale to the numbers of students we have on this course. You should join at least one Teams  
session per week so that we can track your progress.  
Any personal emails received asking for technical support will be ignored. Use the link above if you  
need help.  
SCC110: Software Development Term 3. Programming Project.  
Resources  
To complete this programming project, you will need access to a computer. In these difficult times,  
with no access to the SCC Learning Labs, we understand that this may not be as easy as normal.  
Hence, these projects have been designed to minimise hardware and software requirements.  
If you have a laptop/desktop computer, you should use this to complete this project. All the  
software you needed is available free of charge.  
For Java based projects we recommend you install the OpenJDK (https://openjdk.java.net/)  
and Visual Studio Code (https://code.visualstudio.com/).  
For C based projects, we recommend installing a Linux Ubuntu distribution, which will  
include the gcc compiler and the necessary ncurses library as standard.  
If you have problems setting up your computer, ask for help in one of the support sessions.  
Our TAs will be very happy to assist you.  
If you CANNOT gain access laptop/desktop computer, we have provided an online virtual computer  
that is equivalent to the SCC110 lab machines that you can use. This is accessible via any device that  
have a web browser, including thin client computers, tablets and even mobile phones.  
Select VMWare Horizon HTML Access (or install the VMWare client if you prefer)  
Log in using your LANCS username and password, and select SCC110  
Use this as you would a normal lab computer:  
If you cannot use either of the above approaches, you need to discuss your special requirements  
with our Teaching Office. Please contact our Part I co-ordinator Liam Richards via email at  
If you require any technical support with your development environment, please ask for help  
using the Teams support page.  
SCC110: Software Development Term 3. Programming Project.  
Assessment  
This work will be assessed through continual code review of your work by Teaching Assistants and by  
a code inspection of your work after final submission.  
Your assigned Teaching Assistant will be monitoring the status of your git repository throughout the  
project and will be asking you questions about it via raising issues on your repository. It is YOUR JOB  
to keep your repository up to date, and to answer any questions asked by your TA promptly. This will  
form part of your assessment.  
You are also required to create a short file called README.md in your repository that describes to a  
user precisely how to run your program. This can be either a test file, or use markdown (a simple  
language for adding formatting into text files): https://www.markdownguide.org/getting-started/  
To summarise:  
You MUST maintain your work using the SCC110 git server.  
You MUST ensure that your repository is self-contained and can run on an SCC110  
laboratory PC.  
You MUST have a README.md file that describes how to compile and run your program.  
You MUST ensure that your project can be compiled FROM THE COMMAND LINE. Your  
marker WILL NOT be using an IDE such as Eclipse or IntelliJ to compile your program. If  
your marker cannot compile your program using the standard gcc/javac compilers on the  
command line, you WILL RECEIVED A FAIL MARK (F4) for the functionality section.  
FAILURE TO ADHERE TO THE ABOVE WILL RESULT IN A FAIL MARK (F4) BEING RECORDED.  
SCC110 Git Server and Submission  
We will be using git again for version control. We have set up our own git server specifically for  
SCC.110 which can be accessed at: https://codefeedback.lancaster.ac.uk/git110  
Most of you have already used this server as a final step for the ‘Hoppers’ assessment.  
If you have forgotten the password for this server, click on the ‘forgot password?’ link which is to the  
right of the ‘Sign in’ button. n.b. you must use your Lancaster email address. You can see this listed  
on your Microsoft Teams profile so check you are using the correct one if things aren’t working.  
For this assignment, we have already created repository for you. You should clone this repository,  
make commits and push these commits back to the server throughout your project. The repository is  
called the following (replace <username> for your LANCS username):  
As part of the assessment, you will gain marks for making regular commits with sensible and relevant  
commit messages. We will analyse your use of the repository and will add metrics data in a separate  
branch of the repository. Issues will be created which will allow your mentor to mark your progress  
during the project. The feedback made by your mentor will help you to progress your work on the  
project.
SCC110: Software Development Term 3. Programming Project.  
Marking Scheme  
Your work will be marked based on the following four categories. Your final grade will be determined  
based on a weighted mean of these grades according to the weighting shown in the table below.  
Project Functionality  
See individual project descriptions below for indicative levels of the  
functionality required.  
50%  
20%  
Code Structure and Elegance  
Modularity of code  
Use of appropriate data types and libraries  
Use of appropriate language constructs (arrays, loops, functions,  
methods, classes)  
Code Style  
Appropriate comments, code indentation  
Appropriate name/scope of variables and functions / methods  
10%  
10%  
10%  
Communication  
Quality of the README.md guide  
Ability to answer questions raised by TAs via git issues  
Use of GIT version control  
Clean and regular commits  
Appropriate commit messages  
In all cases a grade descriptor (A, B, C, D, F) will be used to mark your work in each category. The  
following sections provide an indication of the level of functionality expected.  
Markers can also recommend the award of a distinction (+) category overall if they feel a piece of  
work exhibits clearly outstanding practice. If you feel your work warrants a distinction category.
SCC110: Software Development Term 3. Programming Project.  
Project Title:  
Language:  
Project 1: Defender  
C
Project Overview:  
Williams Electronics released the original arcade console ‘Defender’ in 1981. The aim of the game is  
pretty simple. Aliens are trying to abduct your planet’s citizens by ‘tractor beaming them’ from the  
ground and taking them by lifting them to the top of the screen. Once all your population has been  
abducted by the aliens, it’s game over. Fortunately, you have a powerful spaceship with an array of  
weapons at your disposal to destroy the alien horde.  
The original was a side scrolling ‘shootem up style’ game, with a nifty radar view so you could spot  
the aliens and target your attacks.  
Figure 2: A Screenshot of the original William’s Defender Game  
Care was required if you blasted an alien carrying a citizen. If that citizen then dropped too far to the  
ground, they’d also die – so you had to spin round and catch them, giving them a soft landing.  
The aim of this project is recreate your own version of this classic on the UNIX command line  
creatively using ASCII characters (the terminal, not graphics, vector or otherwise). The simplest  
version of the game will feature a ship, an alien, a person, a basic landscape, simulated gravity ,  
keyboard controls for thrust, firing, and a score that increases when you destroy the alien. The rest,  
including how to generate a landscape, the potential for scrolling, radar, mutant aliens, hyperjump  
etc. are up to you!
SCC110: Software Development Term 3. Programming Project.  
Project Requirements  
The exercise focuses on your ability to:  
Solve the challenge of creating a simple game (game loop, movement, collision detection,  
score etc.)  
Exercise your problem-solving skills, especially in the simulation of the spaceship, alien AI  
Work out algorithms to control the ship, generate a landscape, detect collisions, perform the  
game logic  
Generate a GUI for the user to interact with the ship (using ASCII art & the UNIX ncurses  
library)  
Demonstrate good code modularity and style (indentation, commenting etc.)  
Getting Started  
You’ll need to do some research to learn the rules of operation of the game, and you’ll need to learn  
how to use a library of C functions that can assist you in drawing ASCII based graphics to the screen –  
the ncurses library. To get stated, we recommend that you:  
Visit the 80’s arcade website and play the game a couple of times!  
Make notes on the features of the game you can see pay particular attention to the phases  
of gameplay (start, middle, end). What happens when you run out of time, people, or don’t  
catch a citizen?  
Read the introduction to the ncurses library (sections 1-1.3):  
Look back over term 1 and remind yourself of how to compile and run C programs.  
Try the ‘hello world’ example: http://tldp.org/HOWTO/NCURSES-Programming-  
HOWTO/helloworld.html you’ll need to #include <ncurses.h> in your C file and compile  
using:  
gcc -o <target> <src>.c -lncurses  
Now try to create a C program that uses the ncurses library to let you control the position of  
a symbol (e.g. ‘*’) on the screen using keyboard input. Tips: lookup mvprintw, getch and  
timeout in the man pages/online.
SCC110: Software Development Term 3. Programming Project.  
Marking Scheme:  
Marks will be awarded according to the marking scheme shown at the start of this document. Marks  
for the ‘Functionality’ section will be awarded based on individual merit, but the following table  
gives an indicative overview of the level of functionality expected for each grade band:  
A:  
B:  
Working program that meets the criteria for a B, plus:  
Richer game e.g. mutating aliens, smart bomb, multiple lives, scrolling  
Working program that meets the criteria for a C, plus:  
Physics works properly (acceleration, friction), falling citizens  
Multiple aliens, aliens can carry citizens to the top of the screen  
C:  
Working program that meets the criteria for a D, plus:  
Alien that seeks out a citizen  
Player can destroy the alien  
Score updated and displayed  
D:  
F:  
Working program that:  
Basic single player game with a ship, working controls, and firing  
No working program demonstrated, or program does not meet any requirements  
listed above.
SCC110: Software Development Term 3. Programming Project.  
Project Title:  
Language:  
Project 2: Cool Pool  
Java  
Project Overview:  
Simulations are excellent ways to test your ability to implement programs to well-defined  
specifications… The aim of this project is to make use of an advanced version of the GameArena  
classes you used earlier this year to implement a simple graphical simulation of 8 ball pool.  
Figure 3: An Example Pool Application using GameArena  
Project Requirements:  
Your task is to implement a working two player game of pool based on the advanced GameArena  
classes provided for this project. In addition to drawing Balls and Rectangles, the latest version of the  
GameArena classes include support for Lines, Text, mouse input, layering of objects and arbitrary  
colours. This is available via my github repository at https://github.com/finneyj/GameArena. See the  
Javadoc documentation contained inside the github repository for information on how to use these  
new features.  
Your final pool simulation should:  
Display a simple top down view of a pool table, similar to that shown above.  
Allow the user to play a 2 player game of pool against another human player (no need for a  
computer opponent… although this would be very cool indeed).  
Place the balls in the appropriate position at the start of the game.  
Allow players to select the direction and power of their shot in a user friendly manner.  
Display the movement of the balls around the table accurately, including balls bouncing off  
cushions, bounding off one another and friction.  
Implement the basic rules of the 8 ball pool, including placing the white ball at the start of  
the game, potting balls, winning the game and fouls caused by the player potting the white,
SCC110: Software Development Term 3. Programming Project.  
hitting a ball of the wrong colour or no ball at all. The definitive rules of the game can be  
found on the EPA website for anyone wishing to know all the details, but you only need  
concerns yourself with the basic rules for this task, which are well defined here:  
HINT: Some sample code to determine the direction and speed after two balls collide is provided  
below. You are free to use/refactor this code into your project…  
Marking Scheme:  
Marks will be awarded according to the marking scheme shown at the start of this document. Marks  
for the ‘Functionality’ section will be awarded based on individual merit, but the following table  
gives an indicative overview of the level of functionality expected for each grade band:  
A:  
Working program that meets the criteria for a B, plus:  
Support for 2 player operation, including determining when each player  
should take a turn.  
Detection of basic fouls (potting white, hitting wrong colour first, not hitting a  
ball) and continuing play according to the rules of 8 ball pool.  
Detection of when a player wins the game.  
B:  
C:  
Working program that meets the criteria for a C, plus:  
Impacts between multiple balls accurately implemented.  
All balls bounce off cushions accurately.  
All balls handle friction appropriately.  
Balls can be potted.  
Working program that meets the criteria for a D, plus:  
User friendly means to define white ball’s trajectory.  
White ball bounces off cushions accurately.  
White ball comes to rest due to friction appropriately.  
Code detects when a white ball hits another ball.  
D:  
F:  
Working program that:  
Shows a viable Graphical User Interface (GUI).  
All balls are shown at the appropriate start location.  
Initial trajectory of the white ball can be defined somehow.  
No working program demonstrated, or program does not meet any requirements  
listed above.  
If you complete the above, you could look to support variants of pool (nine ball pool, or even  
snooker), or even consider online play, so you can play with your classmates even though we are all  
working from home!  
SCC110: Software Development Term 3. Programming Project.  
Ball Deflection Algorithm:  
This algorithm when given the position and velocity of two balls, will calculate the resultant velocity  
of those two balls after collision. You are free to cut/paste and use this code as part of your project.  
You might want to consider how to refactor it to be more object oriented though…ꢃ  
public void deflect()  
{
/
/
double xPosition1, xPosition2, yPosition1, yPosition2;  
double xSpeed1, xSpeed2, ySpeed1, ySpeed2;  
/ The position and speed of each of the two balls in the x and y axis before collision.  
/ YOU NEED TO FILL THESE VALUES IN AS APPROPRIATE…  
/
double p1InitialMomentum = Math.sqrt(xSpeed1 * xSpeed1 + ySpeed1 * ySpeed1);  
double p2InitialMomentum = Math.sqrt(xSpeed2 * xSpeed2 + ySpeed2 * ySpeed2);  
/ Calculate initial momentum of the balls… We assume unit mass here.  
/
/ calculate motion vectors  
double[] p1Trajectory = {xSpeed1, ySpeed1};  
double[] p2Trajectory = {xSpeed2, ySpeed2};  
/
/ Calculate Impact Vector  
double[] impactVector = {xPosition2 – xPosition1, yPosition2 – yPosition1};  
double[] impactVectorNorm = normalizeVector(impactVector);  
/
/ Calculate scalar product of each trajectory and impact vector  
double p1dotImpact = Math.abs(p1Trajectory[0] * impactVectorNorm[0] + p1Trajectory[1] * impactVectorNorm[1]);  
double p2dotImpact = Math.abs(p2Trajectory[0] * impactVectorNorm[0] + p2Trajectory[1] * impactVectorNorm[1]);  
/
double[] p1Deflect = { -impactVectorNorm[0] * p2dotImpact, -impactVectorNorm[1] * p2dotImpact };  
double[] p2Deflect = { impactVectorNorm[0] * p1dotImpact, impactVectorNorm[1] * p1dotImpact };  
/ Calculate the deflection vectors – the amount of energy transferred from one ball to the other in each axis  
/
double[] p1FinalTrajectory = {p1Trajectory[0] + p1Deflect[0] – p2Deflect[0], p1Trajectory[1] + p1Deflect[1] – p2Deflect[1]};  
double[] p2FinalTrajectory = {p2Trajectory[0] + p2Deflect[0] – p1Deflect[0], p2Trajectory[1] + p2Deflect[1] – p1Deflect[1]};  
/ Calculate the final trajectories  
/
/ Calculate the final energy in the system.  
double p1FinalMomentum = Math.sqrt(p1FinalTrajectory[0] * p1FinalTrajectory[0] + p1FinalTrajectory[1] * p1FinalTrajectory[1]);  
double p2FinalMomentum = Math.sqrt(p2FinalTrajectory[0] * p2FinalTrajectory[0] + p2FinalTrajectory[1] * p2FinalTrajectory[1]);  
/
/ Scale the resultant trajectories if we’ve accidentally broken the laws of physics.  
double mag = (p1InitialMomentum + p2InitialMomentum) / (p1FinalMomentum + p2FinalMomentum);  
/
/ Calculate the final x and y speed settings for the two balls after collision.  
xSpeed1 = p1FinalTrajectory[0] * mag;  
ySpeed1 = p1FinalTrajectory[1] * mag;  
xSpeed2 = p2FinalTrajectory[0] * mag;  
ySpeed2 = p2FinalTrajectory[1] * mag;  
}
/
**  
*
Converts a vector into a unit vector.  
*
Used by the deflect() method to calculate the resultnt direction after a collision.  
*/  
private double[] normalizeVector(double[] vec)  
{
double mag = 0.0;  
int dimensions = vec.length;  
double[] result = new double[dimensions];  
for (int i=0; i < dimensions; i++)  
mag += vec[i] * vec[i];  
mag = Math.sqrt(mag);  
if (mag == 0.0)  
{
result[0] = 1.0;  
for (int i=1; i < dimensions; i++)  
result[i] = 0.0;  
}
else  
{
for (int i=0; i < dimensions; i++)  
result[i] = vec[i] / mag;  
}
return result;  
}
SCC110: Software Development Term 3. Programming Project.  
Project Title:  
Language:  
Project 3: Data Structure Visualisation  
Java  
Project Overview:  
The aim of this project is to write a Java program to assist with the teaching of the abstract data  
structures discussed in SCC120. It will give you an excellent opportunity to explore building and  
visualising different data structures. The process of building these data structures will also aid in  
your understanding of both data structures and object orientation.  
This project requires you to build a number of dynamic data structures in Java from first principles  
(that means you do this part without using any classes other than your own), then using the  
GameArena and Swing classes visualise these in a way that would help users understand these data  
structures.  
SCC110: Software Development Term 3. Programming Project.  
Project Requirements:  
Your task is to implement and visualise an educational program that can represent abstract data  
structures such as an array, linked list or hash table. Your program should implement one or more of  
these data structures in Java from first principles (without using classes such as the Java Collections  
API).  
More specifically, your program should:  
Include classes to represent a data structures such as an array, linked list and hash table.  
These classes should support the ability to add, remove and search for elements. The  
elements themselves need not be particularly complex each simply holding say, a String or  
an integer.  
Provide an educational visualisation based on the GameArena classes so that users can see a  
representation of your data structure on the screen. Your visualisation should update  
dynamically as items are added/removed from a data structure. To assist you in this task,  
new capabilities have been added to the GameArena classes, including the ability to draw  
lines, arrows and text… so be sure to get the latest GameArena classes before you get  
started. You’ll find the latest version in this git repository:  
Include a simple Swing user interface to allow the user to add, remove and search for  
elements in the data structure. Your visualisation should also (ideally) include a simple  
animation to illustrate the operation of the data structures supported by your program.  
Guidance:  
The design of the object structure for this project is quite important, so start with a simple data  
structure such as an array, then work toward the linked list and hash table. Think carefully about  
what classes you will create for an element and how you might use object references to build the  
dynamic data structures. Also consider the relationship between these elements, object references  
and GameArena classes for a Ball and Line.  
You may wish to sketch your design on paper before you begin and discuss it with one of the SCC110  
TAs during one of the online support sessions.  
SCC110: Software Development Term 3. Programming Project.  
Marking Scheme:  
Marks will be awarded according to the marking scheme shown at the start of this document. Marks  
for the ‘Functionality’ section will be awarded based on individual merit, but the following table  
gives an indicative overview of the level of functionality expected for each grade band:  
A:  
Working program that meets the criteria for a B, plus:  
An implementation of a HashMap data structure, including visualisation  
The ability to search for elements in the list via the user interface  
Some form of animation that illustrates the behaviour of that search  
operation.  
B:  
Working program that meets the criteria for a C, plus:  
A Swing user interface that allows the user to select the data structure they  
wish to use (array or linked list), and dynamically add and remove elements  
from that data structure.  
A dynamically updating visualisation, that reacts to users adding/removing  
elements.  
C:  
Working program that meets the criteria for a D, plus:  
Can create a linked list data structure in code using your own classes.  
Shows a representation of that linked list data structure on the screen  
D:  
Working program that:  
Allows the user to create and populate an array in Java code using your own  
classes.  
Shows a representation of that array data structure on the screen.  
F:  
No working program demonstrated, or program does not meet any requirements  
listed above.  
If you complete the above, there are many features you can consider adding. For example, you could  
support multiple data structures on a page, the ability to move (drag and drop) whole data  
structures or individual elements. You could consider further data structures (sets, trees,  
dictionaries). You could allow the user to zoom, support load/save functions…  

程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

发表评论