public class Produce implements Register { double price, pounds, sale; //Constructor accepts parameters to initialize class variables //when an object of type Produce is created. public Produce(double p, double s, double lbs) { price = p; sale = s; pounds = lbs; } //Calculates the total cost of the item accounting for the //price per pound, the weight, percent off, and six percent tax. public double total() { //Determines price of the item. double p = price * pounds; double total; //Accounts for percent off. total = p - (p * (sale/100)); //Adds tax to cost. total += total * .06; return total; } }