日期:2014-05-20  浏览次数:20682 次

求助写一个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;