首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

写一个java类

2012-08-10 
求助写一个java类,求高手指点汽车租赁管理系统 有一租户角色,租户有属性:编号,姓名,身份证号码,联系方式,

求助写一个java类,

求高手指点

汽车租赁管理系统 有一租户角色,
租户有属性:编号,姓名,身份证号码,联系方式,联系地址,租赁车型6个属性,
并且具有修改联系方式和修改租赁车型的两个方法。
要求写出该租户类,用java写

[解决办法]
捡分

Java code
/** * @author xxx * */public class ZuHu {        private int bianHao;        private String xingMing;        private String shenFenZhengHaoMa;        private String lianXiFangShi;        private String lianXiDiZhi;        private String zuLinCheXing;    /**     * @param bianHao     * @param xingMing     * @param shenFenZhengHaoMa     */    public ZuHu(int bianHao, String xingMing, String shenFenZhengHaoMa){        this.bianHao = bianHao;        this.xingMing = xingMing;        this.shenFenZhengHaoMa = shenFenZhengHaoMa;    }        /**     * @return the bianHao     */    public int getBianHao() {        return bianHao;    }    /**     * @return the xingMing     */    public String getXingMing() {        return xingMing;    }    /**     * @return the shenFenZhengHaoMa     */    public String getShenFenZhengHaoMa() {        return shenFenZhengHaoMa;    }    /**     * @return the lianXiFangShi     */    public String getLianXiFangShi() {        return lianXiFangShi;    }    /**     * @return the lianXiDiZhi     */    public String getLianXiDiZhi() {        return lianXiDiZhi;    }    /**     * @return the zuLinCheXing     */    public String getZuLinCheXing() {        return zuLinCheXing;    }        /**     * @param lianXiFangShi     */    public void setLianXiFangShi(String lianXiFangShi){        this.lianXiFangShi = lianXiFangShi;    }        /**     * @param zuLinCheXing     */    public void setZuLinCheXing(String zuLinCheXing){        this.zuLinCheXing = zuLinCheXing;    }        /**     * @param lianXiDiZhi     */    public void setLianXiDiZhi(String lianXiDiZhi){        this.lianXiDiZhi = lianXiDiZhi;    }}
[解决办法]
Java code
public class Renter {    private String cid;    private String name;    private String cardid;    private String tel;    private String address;    private String kind;        public Renter(String cid, String name, String cardid, String tel,            String address, String kind) {        this.cid = cid;        this.name = name;        this.cardid = cardid;        this.tel = tel;        this.address = address;        this.kind = kind;    }        /**     * 修改改联系方式     */    public void setTel(String tel) {        this.tel = tel;    }        /**     * 修改租车类型     */    public void setKind(String kind) {        this.kind = kind;    }}
[解决办法]
这个很简单啊
怎么这么像伸手党
学校布置的作业来要的?
少壮不努力,老大徒伤悲!
如下:
public class Renter {
private String cid;
private String name;
private String cardid;
private String tel;
private String address;
private String kind;

public Renter(String cid, String name, String cardid, String tel,
String address, String kind) {
this.cid = cid;
this.name = name;
this.cardid = cardid;
this.tel = tel;
this.address = address;
this.kind = kind;
}

/**
* 修改改联系方式
*/
public void setTel(String tel) {
this.tel = tel;
}

/**
* 修改租车类型
*/
public void setKind(String kind) {
this.kind = kind;
}
}

[解决办法]


public class Qichezudai {


private String Bianhao;
private String Xingming;
private String ShenfengId;
private String Lianxifangshi;


private String Chexing;

public Qichezudai(String Bianhao,String Xingming,String ShenfengId,
String Lianxifangshi,String Chexing){
this Bianhao=Bianhao;
this Xingming=Xingming;
this ShenfengId=ShenfengId;
this Lianxifangshi=Lianxifangshi;
this Chexing=Chexing;





}

public String getLianxifangshi() {
return Lianxifangshi;
}

public void setLianxifangshi(String lianxifangshi) {
Lianxifangshi = lianxifangshi;
}

public String getChexing() {
return Chexing;
}

public void setChexing(String chexing) {
Chexing = chexing;
}

}


新手写的。。。。
[解决办法]


public class Qichezudai {


private String Bianhao;
private String Xingming;
private String ShenfengId;
private String Lianxifangshi;
private String Chexing;

public Qichezudai(String Bianhao,String Xingming,String ShenfengId,
String Lianxifangshi,String Chexing){
this Bianhao=Bianhao;
this Xingming=Xingming;
this ShenfengId=ShenfengId;
this Lianxifangshi=Lianxifangshi;
this Chexing=Chexing;





}

public String getLianxifangshi() {
return Lianxifangshi;
}

public void setLianxifangshi(String lianxifangshi) {
Lianxifangshi = lianxifangshi;
}

public String getChexing() {
return Chexing;
}

public void setChexing(String chexing) {
Chexing = chexing;
}

}

热点排行