Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created March 29, 2019 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/03314dfc91041c2a38ee6c2818e8a913 to your computer and use it in GitHub Desktop.
Save jasongorman/03314dfc91041c2a38ee6c2818e8a913 to your computer and use it in GitHub Desktop.
Carpet class StandardCarpet(pricePerSqrMetre, roundUp); Real pricePerSqrMetre; Boolean roundUp;
begin
Real procedure price(area); Real area;
begin
if roundUp then
area := ceiling(area);
price := pricePerSqrMetre * area;
end;
end;
Room class RectangularRoom(width, length); Real width, length;
begin
Real procedure area;
begin
area := width * length;
end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment