With appropriate examples define and distinguish between the following terms
i) object oriented programming and procedure oriented programming
ii)classes and objects
iii) constructor and destructor
iv)Abstraction and Encapsulation
What is a function in c++? Distinguish between a library function and a user define d function
what are operators in c++?
illustrate at least 4 different types of illustrators in C++
i) Object oriented programming- Follows bottom-up approach while procedure oriented programming follows top down approach. Examples of Object oriented programming include C++, Java, and C#. Examples of procedure oriented programming are Pascal and C.
ii) Classes are the building blocks in object oriented system while objects are the instances or elements of classes.
iii) Constructors are executed whenever an object of a class is created while Destructors are called when object of a class goes out of scope.
iv)Encapsulation is the wrapping of functions and data into a single unit while abstraction is the act of representing core features of a program without background explanation or details.
Functions are collection of lines of codes that perform a specific function together.
Library functions are functions that are already defined, compiled, and stored in header files of a particular programming language. Library functions cannot be modified by a user.
User defined functions are functions are functions defined by programmers depending on their own specification.
An operator is a symbol that inform a compiler to do a particular logical or mathematical manipulations.
Comments
Leave a comment