代码拉取完成,页面将自动刷新
package cn.hfkh.oop;
public class Code005TestRent {
public static void main(String[] args) {
int days;
int totalMoney;
// 1、客户租赁的多辆汽车信息及租赁天数
Code005MotoVehicle motos[] = new Code005MotoVehicle[4];
motos[0] = new Code005Car("京NY28588", "宝马", "550i");
motos[1] = new Code005Car("京NNN3284", "宝马", "550i");
motos[2] = new Code005Car("京NT43765", "别克", "林荫大道");
motos[3] = new Code005Bus("京5643765", "金龙", 34);
days = 5;
// 2、计算总租赁费用
Code005Customer customer = new Code005Customer("s070537", "沈伟");
totalMoney = customer.calcTotalRent(motos, days);
// 输出客户姓名和总租赁费用
System.out.println("汽车牌号\t\t汽车品牌");
for (int i = 0; i < motos.length; i++) {
System.out.println(motos[i].getNo() + "\t" + motos[i].getBrand());
}
System.out.println("\n客户名:" + customer.getName() + ",租赁天数:" + days
+ ",租赁总费用:" + totalMoney + "。");
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。