Design a console application that will print the cell phone bill of a customer. Make use of an abstract class named Cell that contains variables to store the customer name, talk time and price per minute. Create a constructor that accepts the customer name, talk time and price per minute as parameters, and create get methods for the variables. The Cell class must implement an iPrintable interface that contains the following: public interface iPrintable { public void print_bill(); } Create a subclass called Cell_Billing that extends the Cell class. The Cell_Billing class must contain a constructor to accept the customer name, talk time and price per minute as parameters. Write code for the print_bill method which calculates the total due (talk time * price per minute). Finally write a useCell class to instantiate the Cell_Billing class. Sample output is shown below and you may use the same values to test your application.
Comments
Leave a comment