Question
Write the definition of a class, Swimming Pool, to implement the properties of a swimming pool. Your class should have the instance variables to store:
Write the definition of a class, Swimming Pool, to implement the properties of a swimming pool. Your class should have the instance variables to store: the length (in meters), width (in meters), depth (in meters), the rate (in liters per minute) at which the water is filling the pool, and the rate (in liters per minute) at which the water is draining from the pool. Add member functions, to do the following: Determine the amount of water needed to fill an empty or partially filled pool; The time needed to completely or partially fill the pool or empty the pool; add water or drain for a specific amount of time. Include also a Test class, to test the functionalities of the implemented classes.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started