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