100% found this document useful (2 votes)
635 views4 pages

Oop Chapter 1

Uploaded by

arya.murudkar22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (2 votes)
635 views4 pages

Oop Chapter 1

Uploaded by

arya.murudkar22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
KHARAT ACADEMY Subject - Object Oriented Programming using C++ (OOP - (IMP Questions with Answers) 1 Scheme - MSBTE Branch: Information Technology (CO/CM/CW/IF) (Weightage - 14 Marks) 1. State any four object oriented languages. Answer: Object oriented programming language: a 1) C++ : 2) java 3) C# 4) Python PROCEDI OBJECT ORIENTED PROGRAMMING (POP) PROGRAMMING (OOP) Focus is on doing things _ Focusis on data rather than (procedure). _ procedure Large programs are dividedinto Programs are divided into multiple functions. multiple objects. Data move openly around the © Data is hidden and cannot be system from function to function —_ accessed by external functions Functions transform data from Objects communicate with 4 one form to another by calling each other through function each other i 3, Describe following terms: Inheritance, data abstraction, data encapsulation, dynamic binding. Answer: i) Inheritance: 1) Inheritance is the process by which objects of one class acquire the properties of objects of another class, KHARAT ACADEMY __ 2) It supports the concept of hierarchical classification. It also provides the idea of reusability. ii) Data abstraction: 1) Data abstraction refers to the act of representing essential features without including the background details or explanations. 2) Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight and cost and functions to operate on these attributes. iii) Data encapsulation: 4 1) The wrapping up of data and functions together into a single w it (lied class) is known as encapsulation. 2 2) By this attribute the data is not accessible to the outside world, 2 functions which are wrapped in the class can access it. iv) Dynamic Bindi 6 * 1) Dynamic binding refers to the linking of a procedure c: e exétuted in response to the call. % 2 2) Itis also known as late binding. It means that the.cede issociated with a given procedure call is not known until the time of the call.at run-time. 4, State the use of cin and cout Answer: . 2 cin: cin is used to accept input dat (Keyboard). cout:cout is used to display output d: 5. State use of scope resolution operat OR fm Explain use of scope resol ion operat. Answer: Se, Itis used to uncover a hidden va variable. Scope resolution operator allows access to the global version of a vi ‘able. The scope resolution operator is used to refer variable of class ae in EZ) nes - 6. With Suitable di diagram deverlbe structure of C++ program. OR y Describe structure of C++ program with diagram. Answer; General C++ program has following structure. Ctra ies KHARAT ACADEMY iti = CLUDE HEADER FILES | CLASS DECLARATION MEMBER FUNCTIONS DEFINITIONS MAIN FUNCTION PROGRAM Description: 1) Include header files y In this section a programmer include all header files which are require ecute given program. The most important file is iostream.h header file. This'file defines most of the C++statements like cout and cin. Without this file oie carinot! load C++ A program. ~*~ 2) Class Declaration kK. ‘ y In this section a programmer declares all classes which are nécesSary for given program. The programmer uses general syntax iS 3) Member Functions Definition This section allows programmer to design member funct oh of a class. The programmer can have inside declaration of a function or outside declaration of a function. v 4) Main Function Program f : % In this section programmer create: ject nd galls various functions writer within various class. 7. Write any four benefits of OOP... Answer: Benefits of OOP: 1) We can eliminate redunc int. code and extend the use of existing classes. 2) We can build i programs from’ e standard working modules that communicate with one another, ral er than having to start writing the code from scratch. This leads to saving of development time and higher productivity. 3) The principle‘of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program. 4) Iti possible to have multiple instances of an object to co-exist without any 4 interference. 8; Write the applications of object oriented programming. answerer Applications of object oriented programming are: 1) Real time systems 2) Simulation and modeling 3) Object-oriented databases 4) Hypertext, hypermedia and expertext 5) Al and expert systems 6) Neural networks and parallel programming POneevoene KHARAT ACADEMY 7) Decision support and office automation systems 8) CIM/CAM/CAD systems

You might also like