Question: Exercise 12.25: Convert the example of GEOMETRY_OBJECTs given in Section 12.1.5 from the functional notation to the notation given in Figure 12.2 that distinguishes between

Exercise 12.25: Convert the example of GEOMETRY_OBJECTs given in Section 12.1.5 from the functional notation to the notation given in Figure 12.2 that distinguishes between attributes and operations. Use the keyword INHERIT to show that one class inherits from another class.Exercise 12.25: Convert the example of GEOMETRY_OBJECTs given in Section 12.1.5 fromthe functional notation to the notation given in Figure 12.2 that distinguishesbetween attributes and operations. Use the keyword INHERIT to show that oneclass inherits from another class. define class EMPLOYEE type tuple ( Fname:string; Minit: char; Lname: string; Ssn: string; Birth_date: DATE; Address: string; Sex:

define class EMPLOYEE type tuple ( Fname: string; Minit: char; Lname: string; Ssn: string; Birth_date: DATE; Address: string; Sex: char; Salary: float; Supervisor: EMPLOYEE; Dept: DEPARTMENT; ); operations age: integer; create_emp: EMPLOYEE; destroy_emp: boolean; end EMPLOYEE; define class DEPARTMENT type tuple ( Dname: string; Dnumber: integer; Mgr: tuple ( Manager: EMPLOYEE; Start_date: DATE; ); Locations: set (string); Employees: set (EMPLOYEE); Projects set (PROJECT); ); operations no_of_emps: integer; create_dept: DEPARTMENT; destroy_dept: boolean; assign_emp (e: EMPLOYEE): boolean; (* adds an employee to the department *) remove_emp (e: EMPLOYEE): boolean; end Demoves an employee from the department *) dinTMENT; TYPE_NAME: function, function, ..., function PERSON: Name, Address, Birth_date, Age, Ssn EMPLOYEE: Name, Address, Birth_date, Age, Ssn, Salary, Hire_date, Seniority STUDENT: Name, Address, Birth_date, Age, Ssn, Major, Gpa EMPLOYEE subtype-of PERSON: Salary, Hire_date, Seniority STUDENT subtype-of PERSON: Major, Gpa general, a subtype includes all of the functions that are defined for its supertype plus some lence, it is possible to generate a type hierarchy to show the supertype/subtype relationships s another example, consider a type that describes objects in plane geometry, which may be GEOMETRY_OBJECT: Shape, Area, Reference_point or the GEOMETRY_OBJECT type, Shape is implemented as an attribute (its domain can be an o on), and Area is a method that is applied to calculate the area. Reference_point specifies th low suppose that we want to define a number of subtypes for the GEOMETRY_OBJECT type, RECTANGLE subtype-of GEOMETRY_OBJECT: Width, Height TRIANGLE S subtype-of GEOMETRY_OBJECT: Side1, Side2, Angle CIRCLE subtype-of GEOMETRY_OBJECT: Radius

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!