light.cpp

来自「这个程序是对电梯的模拟」· C++ 代码 · 共 39 行

CPP
39
字号
// Light.cpp: implementation of the Light class.
//
//////////////////////////////////////////////////////////////////////

#include "Light.h"
#include <iostream>
using namespace std;

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Light::Light()
{
     status=false;
}

Light::~Light()
{

}

void Light::LinghtOn()
{
    status=true;
	cout<<"lignt on !"<<endl;
}

void Light::LinghtOff()
{
    status=false;
	cout<<"light off !"<<endl;
}

bool Light::GetLightState()
{
    return status;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?