Simulated sips, spills, and refills
-
Upon each simulation, you are prompted to select a size: tall, grande, venti, trenta, or doppio.
-
After a size is selected, an instance of a cup is initialized with a desired amount (oz) and the cup's maximum volume.
-
The sip! method permanently decreases the amount of coffee in your instance of a cup.
-
The spill! method permanently empties your instance of a cup.
-
The refill! method refills your cup to 2oz less than the cup's maximum volume.
-
Open your terminal, and enter
ruby new_simulation.rb
for a simulation.