Tuesday, June 18, 2019

Principals of Object Orientated Programming for B.C.A.,M.C.A. and all IT Students


--------------------------------------------------------------------------------------------------------------------------
Prepared By : Uday Shah (HOD - IT)
E-Mail : rupareleducation@gmail.com
Contact No : 7600044051



Ch-1 :: Principals of Object Orientated Programming

Q:1   Procedure Oriented Programming?
·        Procedure oriented programming can some time be use as a imperative programming.
·        Which specific the steps the program must take to reach the desires state.
·        In the procedure oriented approach the problem is few as a sequence of things to be done such as reading calculating and printing like input process and output.
·        Procedure oriented programming is biased upon the concept of procedure.
·        Procedure is also known as routines, subroutines, methods or function.
·        It contains a series of computational stapes to carried out.
·        Pascal, COBOL, C etc, Programming language are known as a procedure oriented programming Language.

Q:2   Object Oriented Programming Paradigm(Structure)
·        Object oriented programming is a programming popular in 1970 which is the combination of data and code to make of physical or abstract entity.
·        Object oriented programming is a programming paradigm that use “object” and there interaction to design application and computer program.
·        OOP is not simple few future added to programming language.
·        It is new way of thinking about the process and developing programming solution though he object and built in data and function.
·        OOP is approach that provides a way of modularizing program with the creation of logic and memory area for both data and function.
·        Following is some advantages of OOP.
1.                 OOP permit a development of readable software system such as component can be created and tested as a independent unique.
2.                 Data hidden is possible so can not be access by external function.
3.                 New data and function can be easily added whenever it requires.

Q:3 Basic Concept of Object Oriented Programming.
·        OOP can be define as a method of implementation in which program are organize are as co-operative collection of object.
·        Each of which represent and instance at some class
·        Following is a list of basic concept of OOP.
1.                 Class
2.                 Object
3.                 Method
4.                 Data Abstraction and Encapsulation
5.                 Inheritance
6.                 Polymorphism
7.                 Dynamic Binding
8.                 Massage Passing

1.     Class:
·        A class defines the abstract characteristic of object
·        It specifies object characteristic like its attribute, files, or properties and behavior like method operator and features.
·        A class is a blue print that describes the nature of something.
·        A class is a user define datatype which combine set of data and
·        Code of an object in one unit it is an implementation of abstract data type.
                            
2.     Object:
·        An instance at class is called an object every object will have
·        Data structure called attributes and behavior called operation
                            
3.     Method:
·        Methods are function built in to a class and there for into the
·        Object created from that class

4.     Data abstraction and Encapsulation:
·        Encapsulation is the practice that include code and data in
·        Hidden form from other object in the system insert the wrapping up of data
·        And function into single unit called encapsulation.
·        It is also consider as a data hiding or information hiding.
·        Creation of new data types using encapsulated items known as Data abstraction.

5.     Inheritance:
·        Inheritance is processes by which one object can inherit the property of other Classes are link together in a hierarchy.
·        Each class will have a super class and possible a subclass.
·        Class can inherit methods from its super class and inherit can pass methods onto its sub class.

6.     Polymorphism:
·        The word polymorphism is derived form Greek word where poly means many and morphism means forms.
·        Each allow a single name to be use for more then one related purpose which are technically different  
·        For example: “+” can be specified for both the addition of numbers and concatenation of character even though both are completing different.
·        Show the polymorphism provide the ability to use the same word to invoking different method it is also called operation overloading, function overloading etc…

7.     Dynamic Binding:
·        Binding refer to the type of procedure to the code to be executed in response to the call.
·        Dynamic binding means that the code associated with given procedure code is not know until the time of code at runtime.

8.     Massage Passing:
·        Massage passing is a process by which an object sends data to another object or asked the other object to invoke a method.

Q:4   Benefits of object oriented program.
·        OOP provide several benefits to both the program designer and the user this improve software quality following is some a list of benefits 
1.       Information hiding and data abstraction increase reliability.
2.       Inheritance provides a way to reuse the data by element a redundant code and extend the use of existing class.
3.       Increases the productivity of program.
4.       Dynamic binding increases feasibility by permitting the addition of new class of object without having to modified the existing code
5.       Object oriented system can be easily upgrade and form small scale to large scale industries.

·        OOP Provide other advantages in the production and maintains of software which meet OOP an important technology for building complex software system

Q:5   Application of object oriented programming
·        Application of OOP Technology has importance in almost all area of computing.
·        The most popular application of object oriented programming is in the area of user interface design such as windows.
·        OOP is useful in real time business system to simplify complex problem.
·        The application area of OOP include
1.       Real Time System.
2.       Object Oriented Database.
3.       Hypertext, Hypermedia and Expert system.
4.       Artificial Intelligence and expert system.
5.       Neutral network and parallel programming.
6.       Decision support and office automation system etc…

Q:6  What is c++
·        As the popularity of c-Language number of application where written in it.
·        The problem in c program is that the program became longer and longer as a solution the programmer was design a modular programming but here the data co-ordinate with others and need to keep a discussion of things in a mind
·        So to solve such a problem or limitation in a programming another language was devolved with the concept of object oriented programming which known as c++
 
Q:7 History of c++
·        C++ begin has expended version of c.
·        The c++ extensions was first invented by Bjarne Stroustrup (બેર્જે સ્ટ્રોસ્ટ્રપ ) in 1979 at bell laboratory in new jersey.
·        He initially called the new language “C with Class” however in 1983 the name was change to c++.
·        The idea of c++ come from C increment operator ++.

Q:8 Application of c++
·        The object oriented futures of c++ is used to built large programs with celerity extensibility and easy to maintain.
·        C++ is used to develop verity of ask to handle large program.
·        It is suitable for the virtual reality and programming task including development of editors, compilers, database, communication system and any complex real life application system.

Q:9   Input Output Operators
·        C++ provide few operators called input output operator stream it refer data flow and classified into two part
1.       Output Stream
2.       Input Stream

Output Stream:
·        The output stream allow to performing right operations on output device like screen dist etc. C++ use the bitwise left shift operator for performing consol output operation using cout object
·        following is syntax of output operation 
cout<<variable-name;
·        here cout is a object of standard output stream the symbol << left shift is called insertion or put to operators in insert contain of items like variable content expiration etc..
·        for example
cout<< “hello India”;
·        According to above example it will display hello India message on the screen.
·        It is possible to display more than one item in a single cout output stream object
·        It is known as cascaded output

Input Stream:
·        The input string follow to perform read operation with input device such as keyboard disk file etc..
·        C++ use the bitwise right shift operator for performing consol input operation using c in object
·        following is a syntax of input operator
cin>>variable_name;
·        Here cin is a object of standard input stream the symbol >> right shift called extraction operator it take the value from keyboard and assign it to the variable.
·        Following is a example of cin operator
cin >> a;
·        According to above example it will accept the value of integer variable a it will also accept two different values using cascaded input operator.

Q:10 Structure of c++ program
The c++ program can be divide into following section
1.                 include files
2.                 class declaration
3.                 member function definition
4.                 main function program
·        In a first section specified the header file include statement or other preprocessor directives
·        In a second section the class declaration which has class with member variable and member function.
·        Some time a member function can also be define outside of the class then it will be place in the third section. Any other function can also be define in this section.
·        Every c or c++ program start from main function so in the last main function define with declaration section executable section and with output section.
·        The section may be place in a separated code file and then compile individually or in a group.

Q:11 Intro to namespace
·        Namespace is a uniquely a set of names show that there is no any ambiguity when but the same name are mixed to gather.
·        Namespace is collection of classes, function, method, variable etc…
·        Namespace allow as grouping name entire that work globally or local this allow to organize the element of program into different logical scope.
·        The namespace is a features added in c++ and not in present c-Language.
·        Name space is a declarative region and provides scope of the identifiers.
·        To define a name space use namespace keyword.
·        Name space declaration can be nested within another namespace.
·        Namespace declaration does not have access specifies like privet protected public.
·        Following is syntax of namespace.
namespace name_space_name
{
     Variable declaration
     Variable function
}

·        According to above syntax name space is a keyword name_space_name is name of the namespace and no need to give semicolon after closing brackets of definition of name space.

:: Best Of Luck :: 


Please share and comment it, Thank You.