Similar documents

PROGRAMMING IN C++ COURSE CONTENT

Object Oriented Programming. C++ 6 th Sem, A Div Ms. Mouna M. Naravani

Data Structures using OOP C++ Lecture 3

Data Structures and Programming with C++

Sri Vidya College of Engineering & Technology

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING

JAVA: A Primer. By: Amrita Rajagopal

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Elementary Concepts of Object Class

Object-Oriented Programming (OOP) Fundamental Principles of OOP

Inheritance, and Polymorphism.

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

Unit 1 : Principles of object oriented programming

COMSC-051 Java Programming Part 1. Part-Time Instructor: Joenil Mistal

What are the characteristics of Object Oriented programming language?

Object Oriented Programming using C++

BASIC CONCEPT OF OOP

CHAPTER 5 GENERAL OOP CONCEPTS

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING OBJECT ORIENTED PROGRAMMING CLASS : THIRD SEMESTER CSE

Data Structures and Other Objects Using C++

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Get Unique study materials from

OBJECT ORIENTED PROGRAMMING

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING CS6456 OBJECT ORIENTED PROGRAMMING

Object Oriented Programming(OOP).

Government Polytechnic, Muzaffarpur. Name of the Lab: OBJECT ORIENTED PROGRAMMING

Object Oriented Pragramming (22316)

Chapter 8: Creating Your Own Type Classes

EL2310 Scientific Programming

Chapter 12 Object-Oriented Programming. Starting Out with Games & Graphics in C++ Tony Gaddis

Data Structures (list, dictionary, tuples, sets, strings)

OOPs Concepts. 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8.

What is a Programming Paradigm

VALLIAMMAI ENGINEERING COLLEGE

Lesson Plan. Subject: OBJECT ORIENTED PROGRAMMING USING C++ :15 weeks (From January, 2018 to April,2018)

CompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

Some important concept in oops are 1) Classes 2) Objects 3) Data abstraction & Encapsulation. 4) Inheritance 5) Dynamic binding. 6) Message passing

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

What is Polymorphism? Quotes from Deitel & Deitel s. Why polymorphism? How? How? Polymorphism Part 1

INHERITANCE: EXTENDING CLASSES

JAYARAM COLLEGE OF ENGINEERING AND TECHNOLOGY Pagalavadi, Tiruchirappalli (An approved by AICTE and Affiliated to Anna University)

MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Polymorphism Part 1 1

[ L5P1] Object-Oriented Programming: Advanced Concepts

Chapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc.

MAHALAKSHMI ENGINEERING COLLEGE B TIRUCHIRAPALLI

Advantages of Object Oriented Programming :- Features of Object Oriented Programming :- Advantages Of Object Oriented Programming :

Jayaram college of Engineering and Technology, Pagalavadi. CS2203 Object Oriented Programming Question Bank Prepared By: S.Gopalakrishnan, Lecturer/IT

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

Object Oriented Programming with c++ Question Bank

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

Programs as Models. Procedural Paradigm. Class Methods. CS256 Computer Science I Kevin Sahr, PhD. Lecture 11: Objects

Object Orientated Analysis and Design. Benjamin Kenwright

Chapter 11 Object and Object- Relational Databases

CS304 Object Oriented Programming

1. Write two major differences between Object-oriented programming and procedural programming?


COMS W3101 Programming Language: C++ (Fall 2016) Ramana Isukapalli

CS304 Object Oriented Programming Final Term

CS111: PROGRAMMING LANGUAGE II. Lecture 1: Introduction to classes

What is Inheritance?

Classes - 2. Data Processing Course, I. Hrivnacova, IPN Orsay

Chapter 1: Object-Oriented Programming Using C++

9/21/2010. Based on Chapter 2 in Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh

OBJECT ORİENTATİON ENCAPSULATİON

CS32 - Week 4. Umut Oztok. Jul 15, Umut Oztok CS32 - Week 4

OOP THROUGH C++(R16) int *x; float *f; char *c;

Babaria Institute of Technology Computer Science and Engineering Department Practical List of Object Oriented Programming with C

Chapter 10 Introduction to Classes

XII CS(EM) Minimum Question List N.KANNAN M.Sc., B.Ed COMPUTER SCIENCE IMPORTANT QUESTION (TWO MARKS) CHAPTER 1 TO 5 ( STAR OFFICE WRITER)

Programming, numerics and optimization

VB.NET. Exercise 1: Creating Your First Application in Visual Basic.NET

Inheritance, Polymorphism and the Object Memory Model

PROGRAMMING IN C AND C++:

Introduction to OOP. Procedural Programming sequence of statements to solve a problem.

JAVA GUI PROGRAMMING REVISION TOUR III

Oops known as object-oriented programming language system is the main feature of C# which further support the major features of oops including:

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Java Object Oriented Design. CSC207 Fall 2014

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

Lecture 7: Classes and Objects CS2301

OOPs: The Harsh Realities of Programming

Computer Science XII Important Concepts for CBSE Examination Questions

Compaq Interview Questions And Answers

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

AN OVERVIEW OF C++ 1

Object-Oriented Concept

Lecture 18 Tao Wang 1

Downloaded from

Jaipur National University, Jaipur Dr. Rajendra Takale Prof. and Head Academics SBPIM, Pune

Kapil Sehgal PGT Computer. Science Ankleshwar Gujarat

Example: Fibonacci Numbers

C++ Addendum: Inheritance of Special Member Functions. Constructors Destructor Construction and Destruction Order Assignment Operator

Lecture 04 FUNCTIONS AND ARRAYS

Data Structures (INE2011)

Transcription:

CS6301 PROGRAMMING AND DATA STRUCTURES II QUESTION BANK UNIT-I 2-marks ) Give some characteristics of procedure-oriented language. Emphasis is on doing things (algorithms). Larger programs are divided into smaller programs known as functions. Most of the functions share global data. Data move openly around the system from function to function. Employs top-down approach in program design. 2) What are the features of OOPS? New data s and functions can be easily added. Emphasis is on data rather than on procedure. Programs are divided into sub programs called objects. Data is hidden and cannot be accessed by external functions. Follows bottom -up approach in program design. Suitable for large projects. Objects may communicate with each other through functions. 3) What are the basic concepts of OOPS? Objects. Classes. Data abstraction Data Encapsulation. Inheritance.

Polymorphism. Dynamic binding. Message passing. 4) What are objects? Objects are basic run-time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item that the program has to handle. Each object has the data and code to manipulate the data and theses objects interact with each other. 5) What is a class? Class is simply defined as the collection of similar type. The entire set of data and code of an object can be made a user-defined data type with the help of a class. Once a class has been defined, we can create any number of objects belonging to the classes. Classes are user-defined data types and behave like built-in types of the programming language. 6) What is encapsulation? Wrapping up of data and function into a single unit is called encapsulation. The data is not accessible by other functions that are present outside the class. It is accessible through the function present inside the class. 7) What is data abstraction? It is defined as the process of highlighting the essential details and ignoring the irrelevant details. 8) What are data members and member functions? Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight, and cost and uses functions to operate on these attributes. The attributes are sometimes called as data members because they hold information. The functions that operate on these data are called as methods or member functions. Eg: int a,b; // a,b are data members Void getdata ( ) ; // member function

9) What is dynamic binding or late binding? Binding refers to the linking of function call and its corresponding program code (function definition). Binding occurs at runtime in dynamic/ late binding (i.e) the program code associated with a given function call is not known until the time of the call at run-time. 10) What is inheritance? It is the process of deriving a new class from the existing class or base class. In other words, it is the process by which objects of one class can acquire the properties of objects of another class. 11) Define references A reference is a new name given to an existing storage. So, when you are accessing the reference, you are actually accessing that storage. Data-type &reference-name = variable; 12) What are the rules to be followed in constructor? It should be declared in public. No return type needed. Cannot be inherited though a derived class can call the base class constructor. When the object is created for a class, it automatically executes the constructor and initializes the variables. 13) Give any applications of OOPS Real-time systems. Simulation and modeling. Neural networks. Office automation systems. Used in logical network designing. Used to develop computer games. AI and expert systems. 14) List the types of constructor; Default constructor

Parameterized constructor Copy constructor 15) What is static data member? Static variable are normally used to maintain values common to the entire class. Feature: It is initialized to zero when the first object is created. No other initialization is permitted. only one copy of that member is created for the entire class and is shared by all the objects. Eg: static int count; int classname::count; //count is initialized to zero when an object is created. //definition of static data member 16) What is static member function? A member function that is called even if no objects of the class exist and the static functions are accessed using onlu the class name and the scope resolution operator(::). classname :: function_name; 17) How the objects are used as function argument? This can be done in two ways; A copy of the entire object is passed to the argument. Only address of the objects is transferred to the function. 18) Define constructor A constructor is a special member function whose task is to initialize the objects of its class. It is special because its name is same as class name. The constructor is invoked whenever an object of its associated class is created. It is called constructor because it constructs the values of data members of the class. Eg: Class classname {

public: constructor_name( ) { } }; 19) What are the benefits of OOPS? Eliminate redundant codes by the use of inheritance. Possible to have multiple objects for single class. Highly secured programs through data hiding. Reusability. Easily extend the program from small to large. Easily solve the problems by modularizing the problem into smaller ones called objects. 20) Define polymorphism It means the ability to take more than one form. An operation may exhibit different behaviors in different instances(situations). The behavior depends on the type of data used in the operation. For Ex: 12+10 = 22 and Hello + World = HelloWorld. 21) Draw the structure of C++ Program? Include Header Files Class Declaration Member Function Definition Main Function Body of main

16-Marks 1) Write short notes on the following: a) Comparison of conventional programming and OOPS. b) Constructor and destructors 2) (i) Expalin the control structures of C++ with suitable example. (ii) Explain the concepts of OOPS. 3) What are the various types of constructors? Illustrate with programming examples. 4) Explain the following: (i)object oriented programming paradigm (ii)benefits of OOPS (iii)applications of OOPS 5) Expalin the concept od constructors with suitable example. 6) Explain the major principles of object oriented programming with illustrations. 7) Define and explain the different types of access specifier. Discuss in detail about constant members. 8) (i) Discuss the different ways of passing arfuments to the functions. (ii) Write a C++ program to enter any five digit number and print it in reverse order using class. 9) Write a C++ program to calculate the area of rectangle and cylinder using constructor. 10) Write a C++ program to calculate factorial of a given number using copy constructor. 11) Write a C++ program to print student details using constructor and destructor. 12) Write a C++ program using class to calculate simple interest amount use default value for rate. 13) Write a C++ program to find the Factorial of a given number using Classes and Objects. 14) Write a C++ program to find the prime number using constructor.