You are on page 1of 1

ENEO CONSUMPTION BILLING

Objective:
We want to help ENEO by developing a Java application to produce Energy consumption bill. To
achieve that, we have to create a class with the following attributes: customerNo, customerName,
lastMonth reading, presentMonth reading, and type of contracts. ENEO has two type of contracts: House
and Industrial contract. Compute the amount to be paid using the following fare. If the type of contract
is House contract, calculate the amount to be paid following the various ranges below:
- 0 -100 units corresponds to 50 FCFA per unit
- 101-200 units corresponds to 75 FCFA per unit
- 201 -300 units corresponds to 80 FCFA per unit
- above 301 units corresponds to 100 FCFA per unit
If the type of contract is industrial, calculate the amount to be paid following the various ranges below:
- 0 -100 units corresponds to 60 FCFA per unit
- 101-200 units corresponds to 80 FCFA per unit
- 201 -300 units corresponds to 90 FCFA per unit
- above 301 units corresponds to 120 FCFA per unit

PROCEDURE:

1. Create a class Eneo with three member functions: getUnit(), process(), printBill() and object customer
is created for another class Customerparameter.
2. Create another class Customerparameter which defines the above functions.
3. Using getUnit () function get the consumed units for present and last month.
4. Using compute() function compute the amount depending on the type of contract and number of units
consumed.
5. Using printBill () function, display the bill.

You might also like