再贴设计电梯# JobHunting - 待字闺中
r*u
1 楼
大家comment吧
class Door {
int state; // Door is open or closed.
public:
void open();
void close();
};
class Button {
int indicate; // What does this Button indicate?
int state;
public:
void push(); // Send a request to go to a certain floor.
void clear();
};
class Alarm {
int state; // Current state of alarm, beeping or not
public:
void beep();
void stopBeep();
};
class Light {
int state; // Current state of light, on or off
public:
void turnOn();
void tu
class Door {
int state; // Door is open or closed.
public:
void open();
void close();
};
class Button {
int indicate; // What does this Button indicate?
int state;
public:
void push(); // Send a request to go to a certain floor.
void clear();
};
class Alarm {
int state; // Current state of alarm, beeping or not
public:
void beep();
void stopBeep();
};
class Light {
int state; // Current state of light, on or off
public:
void turnOn();
void tu