Some important factors from "Concepts of Programming Languages (global edition) 11ed. - Robert W. Sebesta"

:Chapter 11, 12

 

(p.472) Abstraction is a weapon against the complexity of programming; its purpose is to simplify the programming process.

 

process abstraction: function/subporgrams

=> problem: side effect(touches variables other than itself  --> coupling modules occur)

⬥data abstraction: object-oriented

 

⬥an abstract data type is an enclosure that includes only the data representation of one specific data type and the subprograms that provide the operations for that type.(p.473)  ==>encapsulation, abstraction hiding

 

constructor(used to initialize the data members of newly created objects.) VS destructor(implicitly called when the lifetime of an instance of the class ends.)

 

interface vs implementation


There are three key features that Object-Oriented languages must provide:

: Abstract data type(ADT), inheritance, dynamic binding(polymorphism)

 

inheritance ==> customizing(reuse with modification): 1.override 2.add new member

 

productivity increase: 1.reuse 2.automation

 

class variables: only exist in class = not created in an instance

(if used in an instance, it means it has used the variable from a class)

class method: can call from a class without an instance

+ Recent posts