Hi,
I'm new with ST and especially data structures and I am trying to create a data structure to store the following shapes and properties:
Name: Location: Form: Color:
Shape1 Bench Round Red
Shape2 Motor Square Blue
Shape3 Gear Round Red
Shape4 Room Triangle Green
I started with this:
1) For Type and Color, should or am I allowed to repeat the repeating properties, like Round or Red?
2) How do I make the associations? Are they made automatically if the arrays are the same size, or how do I make the associations: e.g. Shape1 associated with Bench, Round and Red?
Thank you.
I'm new with ST and especially data structures and I am trying to create a data structure to store the following shapes and properties:
Name: Location: Form: Color:
Shape1 Bench Round Red
Shape2 Motor Square Blue
Shape3 Gear Round Red
Shape4 Room Triangle Green
I started with this:
I have two questions:TYPE
Name: (Shape1, Shape2, Shape3, Shape4);
Location: (Bench, Motor, Gear, Room);
Type: (Round, Square, Round/*again?*/, Triangle);
Color: (Red, Blue, Red/*again?*/, Green);
END_TYPE
Shapes:
STRUCT
ShapeName: Name;
LocationName: Location;
TypeName: Type;
ColorName: Color;
END_STRUCT
1) For Type and Color, should or am I allowed to repeat the repeating properties, like Round or Red?
2) How do I make the associations? Are they made automatically if the arrays are the same size, or how do I make the associations: e.g. Shape1 associated with Bench, Round and Red?
Thank you.