Java

时间:2018-10-18 12:33:24

标签: java class

我想用java制作一个像espnCrickInfo.com这样的webapp,它有一个播放器配置文件。访客可以看到任何带有统计信息和描述的玩家资料,例如crick-buzz或espncrickinfo.com。我为一个球员上了课。这似乎很困难。

//It is general profile for all players.

public class PlayerProfile {
    private String image;
    private String name;
    private int age;
    private LocalDate dob;
    private double height;
    private String country;
    private Game game;
    private int jerseyNo;
    private int totalMatches;
}//this class is for batsman


public class CricketBatsman extends CricketBowler{

    private int totalRun;
    private int totalFifty;
    private int totalHundred;
    private double average;
    private BatsmanType batsmanType;
    private int ducks;
    private int total4s;
    private int total6s;
  }//this class is for bowler


public class CricketBowler extends WicketKeeper {

    private int numberOfWickets;
    private int numberOf5WicketInnings;
    private int numberOf10WicketInnings;
    private BowlerType bowlerType;
    private int totalNoOfBalls;
    private int noOfExtras;
    private int totalRunsConceded;
}//this class is for wicket keeper

public class WicketKeeper {
    private int stumping;
}

有没有什么想法可以使这些类变得容易和简单,并且我可以轻松地将信息存储到数据库中。 仅供参考:圆顶礼帽类型和板球击球手类型有一些枚举类

0 个答案:

没有答案