Advertisement
riggnaros

swimmingpool_header

Apr 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. #pragma once
  2.  
  3. const double GALLONS_IN_A_CUBIC_FEET = 7.48;
  4.  
  5. class swimmingPool
  6. {
  7. public:
  8.     void set(double l = 0, double w = 0, double d = 0,
  9.         double fi = 0, double fo = 0, double wInPool = 0);
  10.  
  11.     void setLength(double l);
  12.     void setWidth(double w);
  13.     void setDepth(double d);
  14.     void setWaterFlowRateIn(double fi);
  15.     void setWaterFlowRateOut(double fo);
  16.     void setWaterInPool(double wInPool);
  17.  
  18.     void addWater(int gallonsAdded);
  19.     void drainWater(int gallonsDrained);
  20.  
  21.     double poolTotalWaterCapacity();
  22.  
  23.     double getLength();
  24.     double getWidth();
  25.     double getDepth();
  26.     double getWaterFlowRateIn();
  27.     double getWaterFlowRateOut();
  28.     double getTotalWaterInPool();
  29.  
  30.     int timeToFillThePool();
  31.     int timeToDrainThePool();
  32.  
  33.     double waterNeededToFillThePool();
  34.     double waterNeededToDrainThePool();
  35.  
  36.     swimmingPool(double l = 0, double w = 0, double d = 0,
  37.         double fi = 0, double fo = 0, double wInPool = 0);
  38.     //Constructor
  39.  
  40. private:
  41.     double length;
  42.     double width;
  43.     double depth;
  44.     double waterFlowInRate;
  45.     double waterFlowOutRate;
  46.     double amountOfWaterInPool;
  47.     double totalCapacityInPool;
  48.     double waterNeeded;
  49. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement