question 8 10 points you work as a builder and you 39 ve created a bucket class to k 5154140

Question 8. 10 points

You work as a builder, and you've created a Bucket class to keep track of the buckets you use in your business. Here is a portion of that class.

public class Bucket{
   private String owner; // owner of bucket
   private double amount; // how much water in bucket – in gallons
   private double capacity; // how much water bucket can hold, in gallons
   final double waterWt = 8.34; // weight of a gallon of water, in pounds

   public Bucket(double amt, double capacity, String who){
   // constructor body goes here
   public String getOwner(){
      return owner;}
   public double getAmount(){
      return amount;}
   public double getCapacity(){
    return capacity;}

For this problem, add a new public method to the Bucket class called heavy. The method should take no parameters, and should return the boolean value true if the water in the (calling) bucket object weighs more than 30 pounds. Otherwise the method should return the boolean false.

Note: for this problem you must use the declared constant value identifier waterWt.

Enter your code for the entire method heavy, including the method header line, in the box below.

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now