/*
  Candy bowl with weight, types of candy and price
  Dr. Carroll & Awesome CPSC 1302K Students
  August 30, 2024
 */
public class CandyBowl{
    private double weight; // grams
    private String typesOfCandy;
    private double price; // USD (based on weight)

    public CandyBowl(){
        setWeight( 0.0 );
        typesOfCandy = "";
    }
    public CandyBowl(double w, String candies){
        setWeight( w );
        typesOfCandy = candies;
    }

    /*
      Mutator method for weight
     */
    public void setWeight( double w ){
        weight = w;
        price = w / 100.0;  // $0.01 per gram
    }
    /*
      Mutator method for types of candy
     */
    public void setCandy( String candies ){
        typesOfCandy = candies;
    }
    /*
      Mutator method for price
     */
    /*
    public void setPrice( double p ){
        price = p;
        }*/

    /*
      Accessor method for weight
     */
    public double getWeight( ){
        return weight;
    }
    public String getCandies( ){
        return typesOfCandy;
    }
    public double getPrice( ){
        return price;
    }

    /*
      Produce a human readable string to describe this object
    */
    public String toString( ){
        return weight + " gram candy bowl with " + typesOfCandy + " ($" + price + ")";
    }
}