create a triangles class it must have the following methods draw int num prints num 5187789
Create a Triangles class. It must have the following methods:
Draw(int num) – Prints num asterisks
Space(int num) – Prints num spaces
Endl() – Prints an end-of-line character
Right(int num) – Prints a num x num Right triangle
Left(int num) – Prints a num x num Left triangle
Pyramid(int num) – Prints a num-sized pyramid
Diamond(int num) – Prints a num-sized diamond
Create a Lab01 class. It must do the following (output to a command/cmd window):
Read num from the command line.
Instantiate a Triangles class.
Draw num Spaces followed by num asterisks all on one line.
Draw a num sized Right triangle
Draw a num-sized Left Triangle
Draw a num-sized Pyramid
Draw a num-sized Diamond
There must be a separator line between each of the objects. It must have 5 carets (^^^^^).
* ** *** **** |
—* –** -*** **** |
—* –*** -***** ******* |
—* –*** -***** ******* -***** –*** —* |
Right Triangle |
Left Triangle |
Pyramid |
Diamond |