I have question? can anyone help me out?
Write a java program to create a Player class. Inherit the classes Cricket_Player, Football_player and Hockey_player from Player class?
What are attributes and methods will I use?
Printable View
I have question? can anyone help me out?
Write a java program to create a Player class. Inherit the classes Cricket_Player, Football_player and Hockey_player from Player class?
What are attributes and methods will I use?
In Cricket_player class
{
String teamname;
String palyername;
int teamscore;
int playerscore;
int boundaries;
viod team(String teamname);
}
class Football_player
{
String teamname;
String palyername;
int teamscore;
int playerscore;
int goal;
viod team(String teamname);
}
Create a class abstract class player that contains some basic attributes of player such Name,Age,Location .
create a class cricket player that extends player class and contain the attribute such Runs and wickets he scored.By getScore(),getWicket() you can retrive the value of score and wicket.
Do the same thing for hockeyplayers...
Nope... it doesn't work that way. The forum helps you with specific answers to specific questions or problems. The forum doesn't give out code or complete solutions upon request... this isn't "Code-R-Us". What have you tried? Show us the code you have tried.
Luck,
CJSL