Sunday, 16 December 2018

1. C ++

Characteristics of C++
C++ is not a purely object-oriented language but a hybrid that contains the functionality
of the C programming language.
C
-universal
-efficient
-close to the machine
-portable

OOP

  1. data abstraction, that is, the creation of classes to describe objects
  2. data encapsulation for controlled access to object data
  3. inheritance by creating derived classes (including multiple derived classes)
  4. polymorphism (Greek for multiform), that is, the implementation of instructions that can have varying effects during program execution.


Extensions
-exception handling
-templates
Various language elements were added to C++, such as references, templates, and exception
handling. Even though these elements of the language are not strictly object-oriented
programming features, they are important for efficient program implementation

Objects
Object-oriented programming shifts the focus of attention to the objects, that is, to the
aspects on which the problem is centered. A program designed to maintain bank
accounts would work with data such as balances, credit limits, transfers, interest calculations,
and so on. An object representing an account in a program will have properties
and capacities that are important for account management.

OOP objects combine data (properties) and functions (capacities). A class defines a
certain object type by defining both the properties and the capacities of the objects of
that type. Objects communicate by sending each other “messages,” which in turn activate
another object’s capacities.
Advantages of OOP
Object-oriented programming offers several major advantages to software development:
■ reduced susceptibility to errors: an object controls access to its own data. More
specifically, an object can reject erroneous access attempts
■ easy re-use: objects maintain themselves and can therefore be used as building
blocks for other programs
■ low maintenance requirement: an object type can modify its own internal data
representation without requiring changes to the application.