Question: 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
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.
Figure 12.2

define class EMPLOYEE type tuple ( Fname: string; Minit: char; Lname: string; string; Ssn: Birth_date: DATE; string; char; Address: Sex: Salary: Supervisor: Dept: float; MPLOYE; DEPARTMENT; ); operations integer; age: create_emp: destroy_emp: MPLOYE; boolean; end EMPLOYEE; define class DEPARTMENT type tuple ( Dname: string; Dnumber: integer; tuple ( Manager: Start_date: EMPLOYEE; DATE; ); Mgr: set (string); set (EMPLOYEE); set(PROJECT); ); Locations: Employees: Projects no_of_emps: create_dept: destroy_dept: operations integer; DEPARTMENT; boolean; assign_emp(e: EMPLOYEE): boolean; (* adds an employee to the department *) remove_emp(e: EMPLOYEE): boolean; (* removes an employee from the department *) end DEPARTMENT;
Step by Step Solution
3.37 Rating (172 Votes )
There are 3 Steps involved in it
GEOMETRYOBJECTS to attributeoperation define class GE... View full answer
Get step-by-step solutions from verified subject matter experts
