representing different kind of players in a class
<p>I am  writing a class to represent cricket players. There are four types of cricket players</p>

<p>1 wicket player<br>
2 batsman<br>
3 bowler<br>
4 allrounder</p>

<p>I'm not sure if I am representing the players in the right way</p>

<pre><code>public class Player {
  final static int WICKETPLAYER=1;
  final static int BATSMAN=2;
  final static int  BOWLER=3;
  final static int ALLROUNDER=4;
  int currentbatting;
  int bowlerbating;
  int playertype;

  public Player(int i,int currentbatting){
      this.currentbatting=currentbatting;
      playertype=i;

  }

  public String whatTypeOFplayer(){
      switch(playertype){
      case WICKETPLAYER:
          return "wicketplayer" ;
      case BATSMAN:
          return " batsman";
      case BOWLER:
          return "bowler";
      case ALLROUNDER:
          return "allrounder";
          default:
              return "error";
      }
  }


}
</code></pre>
