Answer to Question #4395 in C++ for Shaheen

Question #4395
Please help , could you please help me to know what are the variables ofthe following programming statement ? Write the definition of class swimmingPool to impalement the properties of a swimming pool. Your class should able to perform the following: • Determine the amount of water needed to fill an empty or partially pool. • Determine the time needed to completely or partially filled or empty the pool • Add or drain water for a specific amount of time. please I need your help ; thank you very much .
Expert's answer
class cSwimmingPool{
float m_speedAdd;
float m_speedDrain;
float m_width;
float m_height;
float m_length;
void SetWidht(const float _width){
m_width = _width;
void SetHeight(const float _height){
m_height = _height;
void SetLength(const float _length){
m_length = _length;
void SetSpeedAdd(const float _speed){
m_speedAdd = _speed;
void SetSpeedDrain(const float _speed){
m_speedDrain = _speed;
float countWater(const int _half = 1){
return (m_width * m_length * m_height)/_half;
float countTime(const int _half = 1){
return (countWater(_half)/m_speedAdd);
float addTime(const float _time){
return _time * m_speedAdd;
float drainTime(const float _time){
return _time * m_speedDrain;
void main(){

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog