z-huu / ece244

0 stars 0 forks source link

lab3 create command shape list #3

Closed z-huu closed 1 year ago

z-huu commented 1 year ago

when creating a shape, we need to check that the passed type adheres to these requirements

image

as in the passed type is either a ellipse, circle, rectangle, or triangle

should they pass a type that is not allowed, the following err msg should be displayed

image

z-huu commented 1 year ago

implemented helper function to check after we take in type as an argument, shown here

image

the helper function is not efficient but makes use of a globally defined array. the function implementation is shown here

image