import java.util.Scanner;
public class initial {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("欢迎使用大大租车系统");
System.out.println("您是否要租车 :0是 1否");
Scanner c=new Scanner(System.in);
int k=c.nextInt();
if (k!=0){
System.out.println("你在逗我么????");
}
if(k==0){
System.out.println("您可租车的类型及价目表l");
car[]carforrent={new passenger(1,"奥迪a4",500,4),new passenger(2,"马自达6",400,4),
new pika(3,"皮卡雪6",450,4,2),new passenger(4," 金龙 ",800,20),
new trunk(5,"松花江",400,4),new trunk(6,"依维柯",1000,20)};
System.out.println("序号 "+"汽车名称 "+"租金 "+"容量");
/*
*这是数组的构件方法吗
*/
for(int i=0;i<=5;i++){
System.out.println(i+1);
System.out.println(carforrent[i]);}
/*
* 怎样输出数组内容
*/
}System.out.println("请选择车型序号");
int a=c.nextInt();
if (a==1){
System.out.println("您选择了奥迪系列,请输入数量:");
int b=c.nextInt();
System.out.println("请输入租车天数");
int q=c.nextInt();
System.out.println("价格为"+500*b*q+"载客"+b*4*q);}
if (a==2){
System.out.println("您选择了马自达系列,请输入数量:");
int d=c.nextInt();
System.out.println("请输入租车天数");
int w=c.nextInt();
System.out.println("价格为"+400*d*w+"载客"+d*4*w);
}
if (a==3){
System.out.println("您选择了皮卡系列,请输入数量:");
int e=c.nextInt();
System.out.println("请输入租车天数");
int r=c.nextInt();
System.out.println("价格为"+400*e*r+"载客"+e*4*r+"载货"+e*2*r);}
}
}