Last active
April 3, 2019 07:41
-
-
Save jasongorman/cbf6a122940acbae7c01a3d14f0566f5 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
Option Explicit | |
Public Function Quote(ByRef room As Room, ByRef carpet As Carpet) As Double | |
Quote = Price(carpet, Area(room)) | |
End Function | |
Public Function Area(ByRef room As Room) | |
Area = room.Width * room.Length | |
End Function | |
Public Function Price(ByRef carpet As Carpet, ByVal area As Double) | |
If carpet.RoundUp Then | |
area = Ceiling(area) | |
End If | |
Price = carpet.PricePerSqMtr * area | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment