Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with these java language exercises, please try to clarify the first part as much as possible. I already have it done. I

I need help with these java language exercises, please try to clarify the first part as much as possible. I already have it done. I am interested above all in LOAD IN EXTERNAL DATA, CREATE MATCH TEAMS AND RUN TOURNAMENT, but if you ask all the questions better, thanks.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Java For Industry: Take Hone Assignment Tha coursawork is out of 60 , including 10 merks for coding style and organisation. You mustn't use imports other then those tound in java.utll or jawa.10 or java.lang. Whan you have completed your anewers. Uplosed the completed inteliJ prcject to Isarn,gold as a zip file. You code will be checked against other students for similarily using a plagiarism detection tool that an anglyses code structure regardless of varlable names, comments end white spece. Java World Gup In this assignment you will handle team daia from a ficlional association football work cup. to load this data into your application, argarise it it into squace, pick a match tesm. simulata a toumarrent torn the data. Thn tenm data is al tictitious, genarated raxdamy. Hownuar, rames of the tanma mfloct tha toams in the 2022 ' Woeld Cup. You will notice that ile players doxi' orily lare tracitional male namas as this is a mixad toumamant. Inspect the template An Intellbl templata has been created for youl. Ingeect its contanta. You will ga several gheieton cle8ses and a camplete mplementation of a class celed Squsd and a further cless tean thet extends Seusd. There is also 2 data fles, caled Marsegerscest and Playez.cav. Create Person, Player and Manager classes [5 marks] In the provided template create a new class called Person. Person should have the following properties Create a constructor that sets these properties. Alongside getter and setter methocs. Further to person. Create a Player and Manager class that is a child of the Person class. Each should have the following properties. All the properties should be set in a constructor and have a getter and setter method. Player Manager Load in external data [15 marks] In the Main class, loasd in the 2 data files (Pliyers.csv and Managers.rsvi) usirg Scanners. The files are stored as CSV (comma separated values) files. Open them in Intelli to see their structure. Each file contains various information ebout the players and manegers. For players this includes their name, team, position and a series of attributes. Each of these represent how effective the player is at particular skill as a proportion. Llkewlse, manager includes information on their name and attributes, also their preferrod formation for the toarn. Process each data row of the files to create players and managers in your program using the Manager and Player classes yau wrote earlier. Arrange these objects in the static squad array in the Main cless. When you are done the squad aray will be populated with 32 objects of the Squad class. Squad has a Maneger property to fill with a new Manager object from the data. Also, an array Lst players to populate with Player objects you make from the scanned data. The fellowing hints will help you - The first row of eech CSV file is a heeder row, you can ignore its contents using the nextLine0) method of your Scanner object - Fesd in the rest of the file row by row using nextlinei) in a loop - Split the row up into incividual date iterns using the splity method of String with the regular expression "w," as the only parameter. It will return an array of strings which you can use in the manager/ player's constructor to populate all the properties. Create match teams [15 marks] The squads you made in the previous part should have 26 pleyers in each. Now you want to pick a tearn to play in a match. Complete the statie rethod getTearr in the Main class it should return a team that has 11 players matching the managers preferred formation. The formation is arganised so the first digit is for defenders, the second for midfielders and the final digit for forwards. The goalie is not included but you must have ane in your team. For example if the preferred formation is "4-4-2" your team will need 4 detenders, 4 midtleiders, 2 torwards and 1 goal keeper. Pick the best players for your team. To rank the players use an instance of the Comparator interface to organise your soquad's players. Combine all the players attributes and everage them to find the best players. Run tournament [15 marks] This last part of the assignment is designed to be challenging and should only be attempted when you have completed the other parts. Don't worry if you aren't sure what to do or how to start. You can still get a very good mark on the assignment without completing it. In this final part you are to design and run a tournament using the classes and methods you have created above. The tournament must follow the same pattern as a world cup. A group stage with B groups of 4 tegms, where the top two teams go through. Followed by knockout stages to tind a final winner. You could go about this task in many ways with varying degrees of complexity. The most simple versinn might deternine a winer of a match randomly. More inwolved versibres will use the player data of each team to determine a winner of a match. You can appropriste that data how you want. For example you might delermine that unfit players are more likely to get injuries during the toumament or aggressive players are more likely to get booked. Also, consicer whether you wish to just predict a winner or score lines end more detailed match statistics. When you have completed your implementation complete a short description of how it works in the text file TcurmarneritDescription.txt in the terriplate. The static method rurl Teurriament f should start it running. Finally, make sure your implementation outputs eflective information to the terminal describing match results and data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions