You are required to create a web app, to help local Municipality to track electricity usage per household. Each month the Municipality gives Household's 50 units each. As you use appliances, units will drop accordingly. If the units
per household is equal or below 30, add a class warning
into your current units.
In your app you must have the following.
- Be able to top up teriffs.
- Electricity usage, buy choosing a appliance.
- Calculate total usage per household.
- Calculate total usage per street (5 Houses makes a street)
- Calculate the lowest usage per house in a street.
- Calculate the highest usage per street.
Use drop-down
or Checkboxes
to display your appliances
name | rate |
---|---|
Stove | 4.5 units |
Tv | 2.0 units |
Heater | 1.5 units |
Fridge | 4.0 units |
Kettle | 1.8 units |
Household
id | address | meter_number | street_id (fk) | balance |
---|---|---|---|---|
Street
id | name |
---|---|
Appliances
id | name | rate |
---|---|---|
Function name | Description |
---|---|
getCurrentUnits |
return the current units for a household |
buyElectricity |
buy electricity for a household - use id as meter number |
findHighestElectricityUsed |
Find the highest electricity used |
findLowestElectricityUsed |
Find the lowest electricity used |
findAvarageElectricityUsed |
Find average electricity used |
useTeriff |
allow a house to use electricity - use appliances |