Complete a read me of what each class does in this assignment. java | programming | Florida International University, Modesto A. Maidique Campus

 

public class Rice extends Item {

double weight;

double price;

public Rice(String name, double weight, double price) {

 super(name);

 this.weight = weight;

 this.price = price;

}

@Override

public int getCost() {

 return (int) Math.ceil(weight * price);

}

@Override

public String toString() {

 return “rice” + weight + “lbs @” + GroceryStore.cents2dollarsAndCents(getCost());

}

}