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 objectoriented programming concepts, and do not use inbuilt java linked list or sorting methods, but create your own. Rename your zipped folder to StudentNumberAssignmentzip. Also, please comment your name, student number, and assignment 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 In this part of the assignment, your task is to create a singly linked list, you should have the following classes and methods: Create a class called Team, with the following attributes: a teamName String b teamNumber int c regYearlong d firstScore int e secondScore int Create a class called Node, with the following attributes: a team Team b nextNode Node 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 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 is optional as we need not predefine the size of a linked list.
SAMPLE INPUT
Able
dragon
Chelsea
Able,
SAMPLE OUTPUT
tableChelseaDragonAbleAble
Figure : 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 pages 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 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 ie add team to the LinkedList
b deregisterLastteam: remove and return the last team from the LinkedList.
c deregisterParticularteamteamNumber: should search through the LinkedList, remove and return the team with the given teamNumber.
d insertBeforeteamNumber 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
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
