McDonald Paints are planning on releasing an Android smartphone app to their customers. The app will be a home painting estimator.
Write a prototype (paintCalc.java) that gives a
java console version with the following input functionality:
- User is asked to enter the number of rooms (numRooms) to be painted
- For each room, the user is asked to enter the square metres (roomSquareMetres) for that room
With the above information, calculate the following figures using the syntax below:
(1) numJobLitres = calculateLitres(totalSquareMeters, METERS_PER_LITRE);
(2) totalJobHours = calculateJobHours(totalSquareMeters, HOURS_PER_SQUARE_METER);
(3) totalPaintCharge = calculatePaintCharge(numJobLitres, COST_PER_LITRE);
(4) totalLabourCharge = calculateLabourCharge(totalJobHours, LABOUR_PER_HOUR)
(5) totalJobCharge = totalPaintCharge + totalLabourCharge;
Note that the following constants have the respective values:
METER_PER_LITRE has a value of 14
HOURS_PER_SQUARE_METER has a value of 8
LABOR_PER_HOUR has a value of 20
COST_PER_LITRE has a value of 12
Finally,the application should display the following 5 painting estimate summary line items:
[i] Paint Job Specification: Number of Rooms: numRooms; Total Wall Space: totalSquareMeters square meters.
[ii] Cost per Litre: COST_PER_LITRE
[iii] Total Paint Cost: totalPaintCharge
[iv] Total Labor Cost based on estimate of totalJobHours hours of labour at LABOUR_PER_HOUR per hour = totalLabourCharge
[v] Estimated Total Cost: totalJobCharge