第一次不会用,不知道怎么删,已重发http://www.imooc.com/article/12709
居然还有字数要求,拷一段代码吧
package com.imooc.view; import com.imooc.model.*; public class ShowCars { public static final Car[] CARS = { new Truck("Truck1",999f,20f), new Truck("Truck2",888f,16f), new Truck("Truck3",777f,10f), new Coach("Coach4",666f,40), new Coach("Coach5",555f,25), new Coach("Coach6",444f,15), new Pickup("Pikup7",333f,5f,12), new Pickup("Pikup8",222f,4f,10), new Pickup("Pikup9",111f,3f,8), }; public static final void show(){ System.out.println(" 您可租车的类型及价目表"); System.out.println("*****************************************"); System.out.println("序号 汽车名称 租金 容量"); for(int i = 0;i作者: weibo_二月拾伍_03889771
链接:http://www.imooc.com/article/12709
来源:慕课网