Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created March 29, 2019 08:22
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/1911431939f55d17bf915f2959cb6c8d to your computer and use it in GitHub Desktop.
Save jasongorman/1911431939f55d17bf915f2959cb6c8d to your computer and use it in GitHub Desktop.
class Carpet(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;
class Room(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