Question: C# write a complete C# class definition for a class named Player. The class should contain the following private instance members: name of type string
C#

write a complete C# class definition for a class named Player. The class should contain the following private instance members: name of type string and points of type float. The class should contain the following public methods: - setPlayer that accepts two parameters and assigns the first to name and the second to points. The 4, method returns nothing -getName that has no parameters and returns name getPoints that has no parameters and returns the points Write a Program class that has a Main method that instatiates an object of class Player called oneAndDone and also declares variables wildcat of type string and catStats of type float. Next keyboard input is accepted into wildcat and catStats. The setPlayer method of oneAndDone is called passing wildcat and catStats. In a WriteLine statement, display a message that includes calling methods getName and getPoints of oneAndDone. The message may appear as: University of Kentucky baskeball player xxxxxxxxxx scores an average of yyy.yy per game Where xxxxxxxxx is replaced by the name and yyy.yy is replaced by the points statistics of the player
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
