Lecture_18---Object-Oriented-Programming-part-1 (1)

Lecture_18---Object-Oriented-Programming-part-1 (1) - Part1...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Language Concepts Lecture 18 Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Object-Oriented Programming Part 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object Oriented Programming Over time, data abstraction has become essential as  programs became complicated. Benefits:        1. Reduce conceptual load (minimum detail).        2. Fault containment.        3. Independent program components.    (difficult in practice). Code reuse possible by extending and refining  abstractions.
Background image of page 2
Object Oriented Programming A methodology of programming Four (Five ?) major principles: 1. Data Abstraction. 2. Encapsulation. 3. Information Hiding. 4. Polymorphism (dynamic binding). 5. Inheritance.  (particular case of polymorphism ?) Will describe these using C++, because . ..
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The C++ language An object-oriented, general-purpose programming language,  derived from C (C++ = C plus classes). C++ adds the following to C: 1. Inlining and overloading of functions. 2. Default argument values. 3. Argument pass-by-reference. 4. Free store operators  new  and  delete , instead of  malloc()  and   free(). 5. Support for object-oriented programming, through classes,  information hiding, public interfaces, operator overloading,  inheritance, and templates.
Background image of page 4
Design Objectives in C++ Compatibility.  Existing code in C can be used.   Even existing, pre-compiled libraries can be linked  with new C++ code. Efficiency.  No additional cost for using C++.   Overheadof function calls is eliminated where  possible. Strict type checking.  Aids debugging, allows  generation of efficient code. C++ designed by Bjarne Stroustrup of Bell Labs  (now at TAMU). Standardization: ANSI, ISO.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Major improvements over C. 1. Stream I/O. 2. Strong typing. 3. Parameter passing by reference. 4. Default argument values.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 32

Lecture_18---Object-Oriented-Programming-part-1 (1) - Part1...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online