10 likes | 88 Views
Identifying reusable assets, Creation of classes. Working library. Generalization, Standardization, Classification. class. Original program (COBOL85). CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99.
E N D
Identifying reusableassets,Creation of classes Working library Generalization,Standardization, Classification class Original program (COBOL85) CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99. 01 MAX-OVERDRAFT PIC 9(7)V99. ... END OBJECT. END CLASS ACCOUNT. Repository class class owner CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99. 01 MAX-OVERDRAFT PIC 9(7)V99. ... CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99. 01 MAX-OVERDRAFT PIC9(7)V99. ... balance max-overdraft PROCEDURE DIVISION. METHOD-ID. INIT-CHCK-ACC. MOVE ... TO OWNER. MOVE ... TO BALANCE. ... END OBJECT. END CLASS ACCOUNT. PROCEDURE DIVISION. METHOD-ID. INIT-CHCK-ACC. MOVE ... TO OWNER. MOVE ... TO BALANCE. ... END OBJECT. END CLASS ACCOUNT. class CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99. 01 MAX-OVERDRAFT PIC 9(7)V99. ... Objectification PROCEDURE DIVISION. METHOD-ID. INIT-CHCK-ACC. MOVE ... TO OWNER. MOVE ... TO BALANCE. ... END OBJECT. END CLASS ACCOUNT. class class CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99. 01 MAX-OVERDRAFT PIC 9(7)V99. ... CLASS-ID. ACCOUNT INHERITS BASE. OBJECT. DATA DIVISION. 01 OWNER PIC X(30). 01 BALANCE PIC 9(7)V99. 01 MAX-OVERDRAFT PIC 9(7)V99. ... PROCEDURE DIVISION. METHOD-ID. INIT-CHCK-ACC. MOVE ... TO OWNER. MOVE ... TO BALANCE. ... END OBJECT. END CLASS ACCOUNT. 01 account-object PROCEDURE DIVISION. METHOD-ID. INIT-CHCK-ACC. MOVE ... TO OWNER. MOVE ... TO BALANCE. ... END OBJECT. END CLASS ACCOUNT. USAGE OBJECT REFERENCE Object-oriented program (OOCOBOL)