Create a web app, to help your local Municipality to track electricity usage per household. Each month the Municipality gives each household's 50 units each for free. Households can topup if they need extra electricity.
As you use appliances, your 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.
-
Allow user to top up a meter's balance. (update with where)
-
Capture the electricity usage for a given day. ()
-
Show electricity usage, by appliance. Select the appliance from a dropdown an and the total usage for that appliance.
-
show all the meters with a balance higher than 30
-
show all the meters with a balance less than 30
-
Show a list of all the streets
-
Show the number of meters in a given street.
-
Show the total usage of all the meters in a street
-
Show the total usage for all the households. (group by + )
-
Show the total usage for a given street (5 Houses makes a street)
-
Calculate the lowest usage per house in a street. (group by + sum + order by)
-
Calculate the highest usage per street (group by + sum + order by)
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 |