July 2015
Intermediate to advanced
1300 pages
87h 27m
English
When your unit tests all pass, it is time to reorganize code. For example, if you take a look at the Rectangle class, you notice that the Generate from Usage Feature generated objects of type Integer. This is also why the CalculatePerimeter method has been forced to return Integer. Although correct, the most appropriate type for math calculations is Double. Moreover, you might want to consider writing a more readable code in the method body. After these considerations, the Rectangle class could be reorganized as follows:
Public Class Rectangle Public Property Width As Double Public Property Height As Double Public Function CalculatePerimeter() As Double Return (Me.Height + Me.Width) ...