CS 119 Lab 5 – Data Types
Objectives
Perform the following tasks in the order given.
| Assignment: Add another case to the Shape data type which will create a Right Triangle by providing the two sides that meet at the right angle. Modify the area function so that it computes the area of this new shape. |
| Assignment: Write a new function scale :: Float -> Shape -> Shape scale factor s will return a new shape object that is scaled by the given factor. |