# Assignment6a - Page 724-5 Exercises 20.13 Convert the...

This preview shows pages 1–3. Sign up to view the full content.

Page 724-5: Exercises 20.13 Convert the example of GEOMETRY_OBJECTS given in section 20.4.1from the functional notation to the notation given in Figure 20.3 that distinguishes between attributes and operations. Use the keyword INHERIT to show that one class inherits from another class. define class GEOMETRY_OBJECT: type tuple ( shape : enumerated(rectangle, triangle, circle); reference point: ( x: real, y: real) ); operations area: real; end GEOMTRY_OBJECT; define class RECTANGLE: INHERITS GEOMETRY_OBJECT; type tuple ( width : real, height: real); end RECTANGLE; define class TRIANGLE: INHERITS GEO_OBJECT; type tuple ( side1 : real, side2 : real, angle : real ); end TRIANGLE; define class CIRCLE: INHERITS GEOMETRY_OBJECT type tuple ( radius : real, center-x : real, center-y : real ); operations diameter : real; circumference : real; end CIRCLE; Page 724-5: Exercises 20.15 Consider the UNIVERSITY EER schema of Figure 4.10. Think of what operations are needed for the entity types/classes in the schema. Do not consider constructor and destructor operations. define class PERSON: operations change-address (new : Address) : Address; define class COURSE: operations new-section ( Yr, Qtr : integer ) : section; get-currentsec : set ( cur-sec : Current_Section ); change-dept ( new-dept : Department ) : Course; define class STUDENT: operations change-major ( new : Major ) : Student; register ( sec : currentsec ) : boolean; get-transcript : set ( tuple ( course-taken : Course; grade : char; ) ); define class FACULTY:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
operations call-meeting ( S : Student ) : set ( faculty ); compute-support : float; change-dept ( new-dept : Department ) : faculty; make-chairman ( dept : Department ) : faculty; Page 724-5: Exercises 20.16
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/07/2011 for the course MIS unknown taught by Professor Unknown during the Fall '09 term at New York Institute of Technology-Westbury.

### Page1 / 7

Assignment6a - Page 724-5 Exercises 20.13 Convert the...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online