Date | November 2018 | Marks available | 3 | Reference code | 18N.2.SL.TZ0.4 |
Level | SL | Paper | 2 | Time zone | no time zone |
Command term | Identify | Question number | 4 | Adapted from | N/A |
Question
A water authority supplies water to its customers. The amount of water supplied to each customer is measured by a meter. There are two types of meter; an old meter and a new meter.
The water authority also provides sewage services. This is when waste water is returned from the customers’ houses to a central processing plant. Only the new meter is able to estimate the amount of waste water returned.
The authority reads the meters annually and the charges for these services are sent to the customers.
The annual charges to customers are calculated using a model that takes into account the following variables:
METER_TYPE
The type of meter which can be either old or new.
WATER_IN
The reading displayed on both meters (the reading is a 6-digit display in litres) which is used to measure the volume of water supplied.
WATER_OUT
The reading displayed on the new meter only (the reading gives a 6-digit integer display in litres) which is used in estimating the volume of waste water returned to the sewage system.
INFRA_CHARGE
The cost of maintaining the infrastructure for supplying water and providing the sewage service. This is an annual charge of $204.80. This amount is reduced by 10 % if a new meter is used.
The digital displays on each meter function as follows:
- The digital display on each meter increments by one every time a litre of water passes.
- If the display reaches its maximum value it resets to 0 and then continues to function as before.
The rules for calculating the annual bill for each household are as follows:
- The price for each litre of water supplied is $1.90.
- The total annual bill is the sum of the charge for the water supplied and the infrastructure charge.
- If the household has a new meter and at least 95 % of the water supplied is returned to the sewage system, then the infrastructure charge for that household is reduced by 10 %.
Identify the possible range of values and their data type for each of the above variables.
Outline how the yearly supply of water is calculated.
Construct the pseudocode that will calculate the annual bill for a household based on the information given above. You should introduce any new variables where necessary.
Identify three possible measures that customers could take to reduce their infrastructure charge.
Markscheme
Award up to [3 max].
Award [1] for correctly indicating type, and values expected, for each variable up to [3 max];
“MeterType
”, String/char; “old”,”new”;
“WaterVol
”, Integer; 0–999999;
“InfraCharges
”, Currency/Float /Double; 184.32–204.80;
Making use of both the previous and new readings;
Calculating the difference between them;
Award up to [7 max] as follows:
Involving previous readings;
Calculation of water supplied [2] – allow [1] if correct apart from the reset;
Separate code for use of new meter;
Correct reduction of infrastructure charge [2] – allow [1] for an attempt to calculate this;
Calculation of final bill;
Example:
householdBill(OLD_WATER_IN, OLD_WATER_OUT) // the previous
// meter readings
INFRACHARGE = 204.80
if WATER_IN > OLD_WATER_IN // allows for possible
// resetting of meter
//reading to 0
WATER_SUPPLIED = WATER_IN – OLD_WATER_IN
else
WATER_SUPPLIED = 1000000 – OLD_WATER_IN + WATER_IN
end if
if METER_TYPE = "new" // possible reduction in sewage charges
// if new meter is used
if WATER_OUT > OLD_WATER_OUT
WATER_RETURNED = WATER_OUT – OLD_WATER_OUT
else
WATER_RETURNED = 1000000 – OLD_WATER_OUT + WATER_OUT
end if
if WATER_RETURNED > 0.95 * WATER_SUPPLIED
INFRACHARGE = INFRACHARGE * 0.9
end if
end if
BILL = WATER_SUPPLIED * 1.9 + INFRACHARGE
Changing to a new meter (if they have an old one);
Not using the supplied water for watering the garden etc.;
Diverting rain water into the waste/sewage system;