Question: Welcome to your second assignment. This assignment will give you some further practice on linked list and sorting algorithms. IMPORTANT NOTE: You are required to

Welcome to your second assignment. This assignment will give you some further practice on linked list and sorting algorithms. IMPORTANT NOTE: You are required to use object-oriented programming concepts, and do not use in-built java linked list or sorting methods, but create your own. Rename your zipped folder to StudentNumber_Assignment2.zip. Also, please comment your name, student number, and assignment 2 in each Java file, otherwise you will lose marks. Part A: Linked List Consider that you are the administrator of a math club, and you are keen to know a teams chance of entry into a competition, based on their performance (scores) in previous competitions. The club mentor has released historical data about previous teams' scores from two previous competitions. The mentor gave the following information about each team: name, number and corresponding scores from two previous competitions, which can be used to calculate an average final score as follows: [(FirstScore + SecondScore)/2]% In this part of the assignment, your task is to create a singly linked list, you should have the following classes and methods: 1. Create a class called Team, with the following attributes: a. teamName (String) b. teamNumber (int) c. regYear(long) d. firstScore (int) e. secondScore (int)2. Create a class called Node, with the following attributes: a. team (Team) b. nextNode (Node)3. Create another class called CompetitionEntry: This class should be used to store the details of teams that are registered for the competition. Since the number of teams who would register for a competition may not be known in advance, it is wise to use a LinkedList to hold this record. You are thus required to: a. Create a LinkedList to store all the teams registered for the competition. b. The LinkedList should hold a reference to the Team class created in (1) above. i. Create a head Node c. Each team should be identified with their (unique) teamNumber.
UNIVERSITY of the
WESTKRN CAPE
Also, note that parameter "N" is optional as we need not pre-define the size of a linked list.
SAMPLE INPUT
4
Able ,8,2001,48,55
dragon 92005,8070
Chelsea 6,1978,88,95
Able,5,1999,48,55
SAMPLE OUTPUT
\table[[Chelsea,6,1978,88,95,91.5],[Dragon,9,2005,80,70,75],[Able,5,1999,48,55.,51.5],[Able,8,2001,48,55.,51.5]]
Figure 1: Sample input and output expected from your java code in PartB
Part C: Dynamic Sorting
Sorting can be either static or dynamic. Static is the case where you have a predefined property or attribute on which the sorting operation is performed, more like what you did in partB of this assignment. Now, you should modify your code to prompt for a user's choice based on all the possible attributes available in your list. For example, if a user enters "regYear" as a choice property for sorting, then your program should then sort the list using this specified attribute (property), and display the corresponding sorted list.
Final Part: Report
Your final task is to provide a short [MAX 2-4 page(s)] report, summarizing your solution to the above problem with appropriate sections labeling, including the pseudocode to your solution, explanation, and commenting your algorithms. Remember to add a suitable title, (name and student number) in your report. Use consistent fonts (no fancy text). Failure to adhed instructions will result in some penalty.
UNIVERSITY ?2 the WESTKRN CAPR
Add the following methods to your CompetitionEntry class
a. registerTeam:
i. This method should ask for the team's details (number, name, regYear, firstScore, secondScore)
ii. Create the team (create a new instance of the team class)
iii. Register the team i.e. add team to the LinkedList
b. deregister_Last_team: remove and return the last team from the LinkedList.
c. deregister_Particular_team(teamNumber): should search through the LinkedList, remove and return the team with the given teamNumber.
d. insertBefore(teamNumber, newTeam): insert or add a newTeam to the list, before a particular team with the given teamNumber. If the given teamNumber doesn't exist add the newTeam to the end of the LinkedList
e. competitionEntrySize: should return the number of teams registered for the competition.
f. Implement a Display() Method: which prints out all the teams in the LinkedList.
Part B: Sorting (Score Rank List)
5. Supppose you are keen to determine a team's chance of entry into a competition based on their performance (scores) in previous competitions. Your second task is to compute and add a "finalScore (double)" attribute to the Team class, which computes the final percentage (score) of each team using the two previous scores as earlier described, and finally come up with an accurate score rank list. This means that after sorting:
i. A team having maximum finalScore will be at the top,
ii. If t

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!