Created
March 29, 2019 09:28
-
-
Save jasongorman/03314dfc91041c2a38ee6c2818e8a913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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