Skip to content

Programming Assignment 2 In this project you will write a pr

    Programming Assignment 2 In this project you will write a program that helps a player select players in Fantasy Premier League game. You have £100 to get 15 players, distributed as follows: £10 to get 2 goal keepers£25 to get 5 defenders£35 to get 5 midfielders£30 to get 3 forwards You will develop the following classes: Player class: It is an abstract base class and has as private data fieldsstring name;string team;string position;double price;int ptsPrevSeason;As regular public methods, the getters and setters of each private data fieldAn abstract function selectPlayer defined as follows virtual vector selectPlayer(vector players)=0;Goalkeeper class: This is a derived class of class PlayerIt overrides selectPlayer method to select the designed players for goalkeeper positionIt defines the budget for goalkeepers as static constDefender class:This is a derived class of class PlayerIt overrides selectPlayer method to select the designed players for defender positionIt defines the budget for defender as static constMidfielder class:This is a derived class of class PlayerThis is a derived class of class PlayerIt overrides selectPlayer method to select the designed players for midfielder positionIt defines the budget for midfielder as static constForward class:This is a derived class of class PlayerIt overrides selectPlayer method to select the designed players for forward positionIt defines the budget for forward as static const You are given in “Players.txt” the list of player names, teams, positions, price and points in previous season. You have to parse this file to populate the vectors of players of type goalkeeper, defender, midfielder and forward. When overriding selectPlayer method at each derived class, you have to count the available budget for that position and substract the amount of money you spent for previous players taking into consideration that you can select exactly only 2 goalkeepers, 5 defenders, 5 midfielders and 3 forwards. Write the final squad choice into file “Squad.txt” as follows: ***************************** The selected Goalies are: ***************************** Hugo Lloris (Spurs) Heurelho Gomes (Watford) ***************************** The selected Defenders are: ***************************** Kyle Walker (Man City) Daley Blind (Man Utd) Hector Bellerin (Arsenal) Alberto Moreno (Liverpool) Seamus Coleman (Everton) ***************************** The selected Midfielders are: ***************************** Dimitri Payet (West Ham) Oscar (Chlesea) Sadio Mane (Liverpool) Anthony Martial (Man Utd) Christian Eriksen (Spurs) ***************************** The selected Forwards are: ***************************** Sergio Aguero (Man City) Jermain Defoe (Sunderland) Harry Kane (Spurs)

    Do You Need A Similar Assignment Done For You From Scratch? We Have Qualified Writers To Help You. We Assure You An A+ Quality Paper That Is Free From Plagiarism. Order Now For An Amazing Discount!

    Very professional support! Highly recommended.

    Amos

    Researched complicated topic and delivered report by the requested deadline. The paper is of a high standard reflecting careful research and clear assessments. I recommend iLecturers.com.com

    Daria K

     

    It’s a 5 start for me. Excellent research and writing. The paper reflects a careful assessment of scientific information.

    Mahone

     

    With Gib’s reflection, they wrote a really specific essay. Very well written, containing all of the languages I required and excellent references. The writer follows my instructions and writes clearly in English.

    Mario G

     

    I am so grateful and I am 100% happy with your work.

    Julie

     

    A fantastic piece of work 👏. The writer demonstrated full knowledge of the topic and applying the relevant provided material. Well done.

    Dieny