import java.io.*;
public class CCar
{
public class car1 // 基类
{
car1(String tap)
{
if(tap=="big")
System.out.println("this call number is:45656798");
if(tap=="mid")
System.out.println("this call number is:5667800");
if(tap=="lit")
System.out.println("this call number is:23454665");
}
}
public class bigcar extends car1 // 大车
{
bigcar()
{ car1 client=new car1("big");
System.out.println("rent="+300);
}
}
public class midcar extends car1 // 中车
{
midcar()
{ car1 client=new car1("mid");
System.out.println("rent="+400);
}
}
public class litcar extends car1 // 小车
{
litcar()
{ car1("lit");
System.out.println("rent="+500);
}
}
public static void main(String[]args) throws IOException // 主函数
{
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
String a;
a=buf.readLine();
if(a=="big")
bigcar();
if(a=="mid")
midcar();
if(a=="lit")
litcar();
}
}
我想用继承的方法 来输出 大中小汽车的价格和 电话..
请各位帮我改下OK?