本帖最后由 TG·小强 于 2015-12-15 22:28 编辑
- <div class="blockcode"><blockquote>class JiaTongGongJu
- {
- private String chepaibianhao;
- private String pingpaixinghao;
- private String fuzheren;
- JiaTongGongJu(String chepaibianhao,String pingpaixinghao,String fuzheren)
- {
- this.chepaibianhao=chepaibianhao;
- this.pingpaixinghao=pingpaixinghao;
- this.fuzheren=fuzheren;
- }
- public String getChe()
- {
- return chepaibianhao;
- }
- public String getPing()
- {
- return pingpaixinghao;
- }
- public String getFu()
- {
- return fuzheren;
- }
- public void yunshu()
- {
- System.out.println("运输汽车");
- }
- public void baoyang()
- {
- System.out.println("保养汽车");
- }
- }
复制代码
|