Question: Java program with output screenshot Design a class called ElectricityBill that includes the followings: (1) Final value Tax (0.16 = 16%) (2) Private instance variables:

 Java program with output screenshot Design a class called ElectricityBill that

Java program with output screenshot

Design a class called ElectricityBill that includes the followings: (1) Final value Tax (0.16 = 16%) (2) Private instance variables: costumer name, Counterld, and consuming amount. (3) Overloaded constructors to initialize the instance variables. (4) Instance meothd called finalbill() which calculates and returns the cost of electricity consuming according to the following: (0) For consuming less or equal 30kw, the cost is calculated according to the price 50 fils/kW For consuming between 30 kw and 100 kW the cost should be: (30x50 + (the quantity of consuming over 30) 70] For consuming greater than 100 kW, the cost is calculated according to the price 90 fils/kw. Then. The tax should be added to the cost. Write a main class called TestElectricityBill to test the ElectricityBill class; this class you should: (1) Creation of 5 objects of type Electricity Bill.(name of array: customers) (2) Read information about 5 customers. (3) Next, prompts the user for counterID, lookup for this ID and print the bill. Use the following method header: public static void printout((ElectricityBill[ ] customers, int id); the output of this method should look like this: International Electricity Company Customer Name: Ali Ahmad Counter ID: 102658 Consuming Amount: 200 kw Final Bill: 20.88 JD

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!