Write a program to process basketball player information…….solved




5/5 - (2 votes)

Write a program to process basketball player information.Eachbasketballplayer has a name, position and height.Please do the following:(1)Create a class calledBasketballPlayer.Each instance of this class willstore the data of one basketball player.This class must be a derived classof the base classPerson:classPerson{publicstringname;publicPerson(stringmyName){name = myName;}}In the classBasketballPlayer, you can decide how to store the player’sheight and position.(2)Create the following GUI:[Please see next pageRadioButtons to show player’s position, two NumericUpDowns to displayheight (one for feet, another one for inches).The range for feet is 5 to 8,while the range for inches is 0 to 11.Information of Fve basketball players will be stored in the program.TheGUI displays one player’s information.Use a Label to show which playeris current shown (player 1, 2, 3, 4 or 5).Create a “previous” and a “next” button so the user can go to a di±erentplayer.Suppose the user is currently viewing player 3.If the “previous”button is clicked once, the GUI will show information of player 2.If theuser is currently viewing player 3 and the “next” button is clicked once,the GUI will show information of player 4.If player 1 is currently shown, disable the “previous” button because thereis no one before player 1.Similarly, if player 5 is currently shown, disablethe “next” button because there is no one after player 5.Create an “Update Player Info” button.A player’s information can beupdated.The user can change any information, including name, positionand height, of the player.New information will be stored in the program ifthe “Update Player Info” button is clicked.If that button is not clicked,new information will not be saved.(3)Create 5 instances ofBasketballPlayerwith the following information