Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Water JUG Riddle.. I have a 3 and 5 gallon Jug. I want to fill it to exactly fou

ID: 3742946 • Letter: W

Question

Water JUG Riddle..

I have a 3 and 5 gallon Jug. I want to fill it to exactly four gallons. How do I do it as a C++ code ?

The class will have thee private data members, name, capacity and contents Capacity is the size of the bucket, and contents is the amount of water the bucket currently contains. Implement a main method that creates two bucket objects A and B with capacities of 3 and 5 gallons. In a loop, print the current bucket contents, then print a menu giving the user the following options: 0 - Exit 1 - Fill Bucket A 2 - Empty Bucket A 3 - Pour A into B 4 - Fill Bucket B 5 - Empty Bucket B 6 - Pour B into A

PLease explain Thank you

Explanation / Answer

/* if any queries please do comment thank you */