Question: Please answer the translation below Q3 2. Define a class BSVolume which has the following characteristics to manage a volume in the traditional British system.

Please answer the translation below Q3Please answer the translation below Q3 2. Define a class BSVolume which

2. Define a class BSVolume which has the following characteristics to manage a volume in the traditional British system. For your information: 1 bucket = 4 gallons = 16 quarts = 640 fluid ounce. [26 points total] a. It contains integer variables fluidOunce, quart, gallon, bucket. (access right: private). [4 points) b. It has a constructor to set the initial values of fluidOunce, quart, gallon, bucket. [4 points) c. It has functions get_fluidOunce(), get_quart(), get_gallon(), get_bucket() to obtain the corresponding variables. [4 points] d. It has the function get_total_fluidOunce() to convert and return the amount of fluidounce of a given volume. [4 points] e. It has overloaded operator + to calculate the addition of two volumes. The result is simplified (gallon should be less than 4, quart should be less than 4, fluidOunce should less than 40) and stored in the original variables. [10 points) 3. Write a program to calculate the sum of the following volumes. Display the sum on the screen properly. Use the class created from Question 2. [24 points] a. You must declare objects using BSVolume to store a volume. [6 points] b. You must utilize the overloaded operator + to add two volumes together. [6 points] c. The sentence to be displayed on the screen should look like: [6 points] The sum of the volume is 4 buckets 1 gallon 6 fluid ounce. d. If the unit is 0, do not show the unit. If the unit is 1, show the unit in its singular form. If the unit is greater than 1, show the unit in its plural form. [6 points] The volumes are given as: 37 fluid ounces 2 gallons 3 quarts 27 buckets 18 fluid ounces 1 gallon 3 quarts 3 bucket 1 quart 1 bucket 2 gallons 3 quarts 4 fluid ounces

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!