Bug 705910  2013-10-27
Check the indices goes correctly
 All Classes Namespaces Files Functions Variables Enumerations Enumerator
aircond.h
Go to the documentation of this file.
1 
11 {
12 public:
18  空調設定( int i気温, int i湿度 ) : 気温( i気温 ), 湿度( i湿度 ), 扇風機( false ), ヒーター( false ), クーラー( false )
19  {
20  }
21 
26  virtual ~空調設定()
27  {
28  }
29 
35  {
36  if ( 扇風機 ) { return; }
37  扇風機 = true;
38  湿度 -= 3;
39  return;
40  }
41 
47  {
48  if ( !扇風機 ) { return; }
49  扇風機 = false;
50  湿度 += 3;
51  return;
52  }
53 
59  {
60  if ( ヒーター ) { return; }
61  ヒーター = true;
62  温度 += 5;
63  return;
64  }
65 
71  {
72  if ( !ヒーター ) { return; }
73  ヒーター = false;
74  温度 -= 5;
75  return;
76  }
77 
83  {
84  if ( クーラー ) { return; }
85  クーラー = true;
86  温度 -= 5;
87  return;
88  }
89 
95  {
96  if ( !クーラー ) { return; }
97  クーラー = false;
98  温度 += 5;
99  return;
100  }
101 
102 protected:
103  int 温度;
104  int 湿度;
105  bool 扇風機;
108 };
virtual ~空調設定()
destructor
Definition: aircond.h:26
int 温度
The temperature.
Definition: aircond.h:103
void 扇風機を止める()
turn off the fan
Definition: aircond.h:46
bool ヒーター
shows the heater is currently working
Definition: aircond.h:106
void 扇風機を回す()
turn on the fan
Definition: aircond.h:34
int クーラーを切る()
turn off the cooler
Definition: aircond.h:94
bool クーラー
shows the heater is currently working
Definition: aircond.h:107
This class simulates controling air conditions.
Definition: aircond.h:10
int 湿度
The humidity.
Definition: aircond.h:104
int クーラーをつける()
turn on the cooler
Definition: aircond.h:82
空調設定(int i気温, int i湿度)
constructor
Definition: aircond.h:18
int ヒーターをつける()
turn on the heater
Definition: aircond.h:58
bool 扇風機
shows the fan is currently working
Definition: aircond.h:105
int ヒーターを切る()
turn off the heater
Definition: aircond.h:70