검색결과 리스트
글
엔터 프라이즈
class Car
{
private String model;
private String color;
private int speed;
private int account;
Car()
{
}
public int getAccount() {
return account;
}
public void setAccount(int account) {
this.account = account;
}
public void printState()
{
System.out.println(model);
System.out.println(color);
System.out.println(speed);
}
}
///////////
public interface OperateCar {
boolean getRadarFront(double distanceToCar,double speedOfCar);
boolean getRadarRear(double distanceToCar,double speedOfCar);
}
//////////////
class Texi extends Car implements OperateCar
{
double drivingDistance;
double money; // 요금
Texi()
{
}
public void printState()
{
super.printState();
money=drivingDistance*1000;
System.out.println("택시 요금 : "+money);
}
@Override
public boolean getRadarFront(double distanceToCar, double speedOfCar) {//전면
// TODO Auto-generated method stub
return false;
}
@Override
public boolean getRadarRear(double distanceToCar, double speedOfCar) {//후면
// TODO Auto-generated method stub
return false;
}
}
'학교 > 엔터프라이즈' 카테고리의 다른 글
실습 채팅 ClientFrame (0) | 2013.04.18 |
---|---|
엔터프라이즈 실습4 (0) | 2013.03.28 |
엔터프라이즈 실습3 (0) | 2013.03.27 |
엔터프라이즈 (0) | 2013.03.06 |