• The information needed to store in a file: name, address, account number, current meter reading, past meter reading, usage, total.
  • Functions that need to be developed:
    • Calculate electricity bill
    • Add record into array of object
    • Display all records
    • Search – Search by name or account number. Then, display only one record
    • Delete – delete through account number
    • Edit a record
  • Use an array of object
  • Use a menu concept like ATM machine
  • Element:
    • Input Output
    • Selection
    • Looping
    • Array of Object
    • Object Oriented
    • System must be user friendly (eg. Display message)

Rate:

Category Rate
0 – 200 first unit RM 0.218
201 – 300 RM 0.334
301 – 400 RM 0.400
> 400 RM 0.402
Account number: xxxx
Name: xxx
Address: xxxx
Current meter reading : 1260
Past meter reading : 1130
Usage: 130
Amount: 19.00
Details:
Ex: Usage = 130
130 X 0.218= 28.34
Total = 28.34
Details:
Ex: Usage = 250
200 X 0.218 = 43.60
50 X 0.334 = 16.7
Total = 60.30
Details:
Ex: Usage = 378
200 X 0.218 = 43.60
100 X 0.334 = 33.4
78 X 0.400 = 31.20
Total = 108.20
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.