程序代写代做代考 The purpose of this assignment is to build part of a system that would be used to track the voters for the different electorat

The purpose of this assignment is to build part of a system that would be used to track the voters for the different electorat

Department of Computing

Bachelor of Information and Communication Technologies Graduate Diploma of Information and Communication Technologies

BCSE 101 Software Engineering

Assignment Two
Programming Assignment 1

Semester Two 2016

Due date: Friday 14 Oct

2016

Time: 5.00pm
Section

Marks

A

5

B

15

C

30

Total

50

Student Name/ID ………………………………………………………………………………………………….

CPIT and its faculty members reserve the right to use electronic means to detect and help prevent plagiarism. Students agree that when submitting this assignment, it may be subject to submission for textual similarity review to Turnitin.com.

Submissions received late will be subject to a penalty of 10% of the student’s mark per working day.

This assignment is worth 10% of the total marks for BCSE101.
This paper has eight (8) pages including the cover sheet.

Assignment Description

The purpose of this assignment is to build part of a system that would be used to work out who qualified for the 2016 Olympics Women’s Golf track competition. The class diagram below shows how this system is to be implemented:

<>

Note:
· This is a partial system.
At the end of this assignment, once you have handed in your work, you will be given a model answer. That will be the basis for the next assignment which will add more details (entering of results, calculation of winners) to what you have to do for this first assignment. Think of this as ‘iteration 1’ of the building of a larger system.

Controler.js
The code in Controller.js will load test data.
class Controller {
static setup () {
var olympics = new Olympics();
olympics.addPossiblePlayer( 1, “Lydia Ko”, “NZL” )
olympics.addPossiblePlayer( 2, “Brooke M. Henderson”, “CAN” )
olympics.addPossiblePlayer( 3, “Inbee Park”, “KOR” )
olympics.addPossiblePlayer( 4, “Lexi Thompson”, “USA” )
olympics.addPossiblePlayer( 5, “Sei Young Kim”, “KOR” )
olympics.addPossiblePlayer( 6, “Amy Yang”, “KOR” )
olympics.addPossiblePlayer( 7, “Ariya Jutanugarn”, “THA” )
olympics.addPossiblePlayer( 8, “In Gee Chun”, “KOR” )
olympics.addPossiblePlayer( 9, “Stacy Lewis”, “USA” )
olympics.addPossiblePlayer( 10, “Ha-Na Jang”, “KOR” )//
olympics.addPossiblePlayer( 11, “Anna Nordqvist”, “SWE” )
olympics.addPossiblePlayer( 12, “So Yeon Ryu”, “KOR” )//
olympics.addPossiblePlayer( 13, “Shanshan Feng”, “CHN” )
olympics.addPossiblePlayer( 14, “Minjee Lee”, “AUS” )
olympics.addPossiblePlayer( 15, “Gerina Piller”, “USA” )
// continued for a total of 1189 players

runner.html
Run your code using the following document.
Place runner.html is the directory ABOVE the /src directory which holds the other files


BCSE101 16S2 Programming Assignment 1







theDisplay = document.getElementById(“divDisplay”);
document.body.style.fontFamily = ‘Courier New’;
theDisplay.innerHTML = theOlympics.getAll();
console.log(theOlympics);
};
window.onload = go;

Department of Computing
Computing

2

SECTION A TOTAL: 5 MARKS

Create the directories, files and classes.

1. Create directories and build the necessary files.

Look at the provided Runner.html code on page 4 to see required directory and file structure.

Plan this by drawing a UML package diagram. http://www.agilemodeling.com/artifacts/packageDiagram.htm

2. Write the Olympics and Player classes and their constructors.

Add collections, properties and classes as shown on page 2 of this assignment

Model your code on the ToyBox-Toy example code.

Write an addPossiblePlayer method in the Olympics class.
Write an addQualifiedPlayer method in the Olympics class

SECTION B TOTAL: 15 MARKS

calculateQualification

Write a calculateQualification method for the Olympics class

This method should be based on the Calculate Entries Use Case.

It will have to call other methods that you will also need to create.

NOTE if you get stuck on this then in the Controller class comment out lines 4 to 1194 and uncomment lines 1197 to 1262. You can then call addQualifiedPlayer which “cheats” and adds the actual players who qualified. This allows you to work on the next section and come back to calculateQualification latter.

SECTION C TOTAL: 30 MARKS

Writing get Methods

Work in the Olympics class and write a getAll method which is called by runner.html.
runner.html Line 22 theDisplay.innerHTML = theOlympics.getAll();

This method should run all the other ‘get’ methods in the Olympics class
getAll () {
let result = “”
result += this.getEnteredPlayers()
result += this.getQualifiedPlayers()
result += this.getPossibleCountries()
result += this.getQualifiedCountries()
result += this.getQualificationCountsByCountry()
result += this.getSortedQualificationCountsByCountry ()
return result
}

3. Write a getEnteredPlayers method that lists the names and countries of each player in golf ranking order.
(5 marks)

4. Write a getQualifiedPlayers method that lists the names and countries of each player in qualification order.
(5 marks)

5. Write a getPossibleCountries method that lists the countries (only once) of all potential entries in alphabetic order.
(5 marks)

6. Write a getQualifiedCountries method that in alphabetic order lists the countries (only once) of all the players.
(5 marks)
7. Write a getQualificationCountsByCountry method that lists the countries (only once) of all the players who qualified as well as the number of players from that country who qualified. This countries should listed from highest number of qualifiers to lowest and then in country alphabetic order
(5 marks)

8. Write a getSortedQualificationCountsByCountry method. This lists the same data as the previous question but sorts the countries firstly by number of qualified players (highest first) and then alphabetically by country
(5 marks)

How to Submit your Assignment:

1. Submit all your \src directory files
2. Submit via the PROG1 assignment DROPBOX on BCSE101 Moodle
3. IF you worked in a group the ONE group member submits the code for the group and ALL group members submit the Assignment Cover Sheet showing who worked together..

Outcome
5
4
3
2
1
0
Mark awarded

Part A – Creating directories, files and classes

· Has created all of the directories, files, class constructors, are correct
· All attributes and collections have been created.
· Methods have good use of meaningful variable names, white space and indenting.
· Has created all of the classes, references and relationships as shown in the diagram.
· Most of the attributes shown on the classes have been created.
· methods have been created correctly with mostly good use of meaningful variable names, white space, indenting and commenting.
· Has created all of the classes, and most of the references and relationships as shown in the diagram.
· Most of the attributes shown on the classes have been created.
· methods have been created correctly with satisfactory use of meaningful variable names, white space, indenting and commenting.
· Has created all of the classes, and some of the references and relationships as shown in the diagram.
· Some of the attributes shown on the classes have been created.
· methods have been created correctly with some use of meaningful variable names, white space, indenting and commenting.
· Has created some of the classes, and some of the references and relationships as shown in the diagram.
· Some of the attributes shown on the classes have been created.
· methods have been created with no or little use of meaningful variable names, white space, indenting and commenting.
· Has created none of the classes, and none of the references and relationships as shown in the diagram.
· None of the attributes shown on the classes have been created.
· No / incorrect methods have been created

Mark Weight 1

Part B –
addEntries
· Has created method which creates the team and adds it to the right collection
· The code has been written correctly with good use of meaningful variable names, white space, indenting, and transaction handling
· Has correctly created the method
· The code has been written correctly with satisfactory use of meaningful variable names, white space, indenting, and transaction handling
· Has created the method for the most of it is correct
· The code has mostly been written correctly with satisfactory use of meaningful variable names, white space, indenting, and transaction handling
· Has created the method for the and some of it is correct
· Some of the code has been written correctly with some use of meaningful variable names, white space, indenting, and transaction handling
· Has created the method for the BUT little of it is correct
· Some of the code has been written correctly with little use of meaningful variable names, white space, indenting, and transaction handling
· Has not created the necessary methods
· None of the code has been written

Mark Weight 1

School of Computing Faculty of Commerce

Part C –
calculateQualifiers
· Has correctly created the method
· Good use has been made of meaningful variable names, white space, indenting, and transaction handling
· Has correctly created the method
· Mostly good use has been made of meaningful variable names, white space, indenting, and transaction handling
· Has created the method for the most of it is correct
· Mostly good use has been made of meaningful variable names, white space, indenting, and transaction handling
· Has created the method for the and some of it is correct
· Some use has been made of meaningful variable names, white space, indenting, and transaction handling
· Has created the method for the BUT little of it is correct
· Little use has been made of meaningful variable names, white space, indenting, and transaction handling
· Has not created the method
· No use has been made of meaningful variable names, white space, indenting, and transaction handling

Mark Weight 2

Part D –
get methods
for each part:
· Has written a method that works correctly as described
· Has correctly written any other methods that may have been needed
· Good use has been made of meaningful variable names, white space and indenting
· Has written a method that works mostly as described
· Has correctly written any other methods that may have been needed
· Mostly good use has been made of meaningful variable names, white space and indenting
· Has written a method that works mostly as described
· Has correctly written most other methods that may have been needed
· Mostly good use has been made of meaningful variable names, white space and indenting
· Has written a method that does some of what is required
· Has correctly written some of the other methods that may have been needed
· Some use has been made of meaningful variable names, white space and indenting
· Has written a method that does little of what is required
· Few other methods are used or those other methods that exist are incorrect
· Little use has been made of meaningful variable names, white space and indenting
· Has not written a method
· Has not written any other methods.
· No use has been made of meaningful variable names, white space or indenting.

Mark Weight 1

getEnteredPlayers

getQualifiedPlayers

getPossibleCountries

getQualifiedCountries

getQualificationCountsByCountry

getSortedQualificationCountsByCountry

School of Computing