Here's a solution in node.js. Can be easily transcribed to other languages:
var paint_per_sqf = 1/350;
var wall_area = 250.0;
var gallons_paint = wall_area * paint_per_sqf;
console.log(wall_area.toFixed(1) + " square feet wall will need:");
console.log(gallons_paint.toFixed(12) + " gallons of paint");
Ask your self questions can help you think of what to measure, in order to get answers.
Small programs stored on the harddrive that provide basic functionality for he devices listed would be called Hardware Drivers.
I hope this helps!