Compare commits

..

No commits in common. "feat/motor_warmup_mothed_1" and "master" have entirely different histories.

1 changed files with 0 additions and 10 deletions

10
1st.cpp
View File

@ -18,19 +18,9 @@ public:
class Motor : public Device { class Motor : public Device {
public: public:
void turnOn() override { void turnOn() override {
if(needsWarmup()) {
warmup(); // 預熱馬達
}
// 啟動馬達 // 啟動馬達
} }
void turnOff() override { void turnOff() override {
// 關閉馬達 // 關閉馬達
} }
private:
bool needsWarmup() {
// 判斷馬達是否需要預熱
}
void warmup() {
// 預熱馬達
}
}; };