tailieunhanh - Object Oriented Programming - Lesson 3: Class Building

Object Oriented Programming - Lesson 3: Class Building Understand the application of object oriented principles in Java, Acquaint how to declare a class and its members, Data abstraction, Class building. | LESSON III Class Building Trinh Thanh TRUNG (MSc) trungtt@ 1 Objectives • Understand the application of object oriented principles in Java • Acquaint how to declare a class and its members 2 Content • Data abstraction – – – – Overview Class and instance Message passing Visibility • Class building – Declaration • Class declaration • Class member declaration – Data hiding 3 Abstraction • "Abstraction – a concept or idea not associated with any specific instance" – . Mathematics definitions • Two types of abstraction – Control abstraction • Using subprogram and control flow • . a:=(1+2)*5 – Data abstraction • . data type 4 Abstraction • Abstraction hides the detailled information about object. • Abstraction is a view or representation of an object that includes only the most significant attributes – These attributes make dicstinction this object with .