(* RSL Examples showing how UML syntax is handled. Words in ALLCAPS are the UML terminology for the example shown. Written by: Dan Stearns Date: Fall 1998 CSC 205 Modified 10/28 Added Associaton Class Example *) (* There is N-N ASSOCIATION between student and section *) (* These are user-defined attributes; their primary use is to define ASSOCIATION relationships and ASSOCIATION CLASSES *) define object attribute associates_with:association_class; object Section components: number:string and quarter:number and Course and inst:string; associates_with: Students; operations: (* *); description: (* number, quarter and inst are ATTRIBUTES Course is an AGGREGRATE associates_with defines an ASSOCIATION relationship association_class defines an ASSOCIATION Class with attributes related to the association *); end Section; (* Shorthand if no components nor operations defined *) object Sections = Section*; object association_class = ...; object Enrollment extends association_class components: grade:string; associates_with: Student and Section; operations: (* *); description: (* Enrollment is an ASSOCIATION CLASS that defines the attributes of an association between two other classes. *); end Enrollment; object Student components: Name:string and Id:number and Major:string; associates_with: Sections; operations: (* *); description: (* Student is a SUPER CLASS - a general template of which other types may be defined *); end Student; (* Shorthand if no components nor operations defined *) object Students = Student*; object Course; -- Just a place holder