test7.14
来源:互联网 发布:疯狂的程序员绝影真人 编辑:程序博客网 时间:2024/05/18 01:03
class Engine
{public void start(){}
public void rev(){}
public void stop(){}
public void service(){System.out.println("Service ");}
}
class Wheel
{public void inflate(int psi){}}
class Window{
public void roolup(){}
public void rooldown(){}
}
class Door
{public Window window=new Window();
public void open(){}
public void close(){}
}
public class Car {
public Engine engine=new Engine();
public Wheel[] wheel=new Wheel[4];
public Door left=new Door();
public Door right=new Door();
public Car(){
for(int i=0;i<4;i++)
wheel[i]=new Wheel();
}
public static void main(String[] args) {
Car car=new Car();
car.left.window.roolup();
car.wheel[2].inflate(72);
car.engine.service();
}
}
{public void start(){}
public void rev(){}
public void stop(){}
public void service(){System.out.println("Service ");}
}
class Wheel
{public void inflate(int psi){}}
class Window{
public void roolup(){}
public void rooldown(){}
}
class Door
{public Window window=new Window();
public void open(){}
public void close(){}
}
public class Car {
public Engine engine=new Engine();
public Wheel[] wheel=new Wheel[4];
public Door left=new Door();
public Door right=new Door();
public Car(){
for(int i=0;i<4;i++)
wheel[i]=new Wheel();
}
public static void main(String[] args) {
Car car=new Car();
car.left.window.roolup();
car.wheel[2].inflate(72);
car.engine.service();
}
}
0 0
- test7.14
- test7
- test7
- test7
- Test7.1
- test7.2
- Test7.5
- test7.6
- test7.7
- test7.8
- test7.9
- Test7.10
- test7.11
- test7.12
- test7.13
- test7.15
- test7.16
- test7.17
- 堆排序
- 1496:Equations
- 关于spark history server 无法显示完成的JOB的问题解决
- 《如何阅读一本书》!
- UVA 11280 Flying to Fredericton
- test7.14
- rapidjson常见使用示例
- javaweb用户密码的封装
- MongoDB命令行与进程
- lua - string【方法】
- 兼容C++的C头文件书写方式
- OC基础-NSData-字节流数据
- C++内存占用问题
- 四元数(Quaternion)学习