H3: Model Constraints 

In class lectures we created a metamodel of UML class diagrams that were limited to Class declarations and Association links. The diagram that we used is shown below.


Your Task

Generalize this metamodel to include inheritance (generalization) relationships. Your revised diagram shown should conform to itself. Use Visio (or whatever tool) to draw your metamodel.

What to Submit

Submit a PDF with the following information, using the required format:
  1. Your revised metamodel.

    Specify any applicable constraints in your design in ENGLISH. A model without constraints is wrong and will lose points.

    Carefully explain the semantics of your diagram. The clarity of your explanation is important in assigning a grade.

  2. As best as you can, translate your above constraints into Prolog constraints.  You do NOT have to create a set of Prolog tables (for the problem below) and evaluate your rules, but frankly, this would be worth your effort as it would make your next programming assignment MUCH easier.  There are no errors in the figure below, but it would be really easy to introduce errors if you wanted to check your constraints.

    1. Hint: if you go the Prolog route, here's what to do:  in a single file, define your Prolog tables and constraints.  You can then run SWI Prolog and evaluate your constraints. You don't need CatalinaLite for this assignment.
  3. Translate your revised metamodel to tables.  Show how you represent the Shopping Cart diagram below as tuples in your metamodel tables.