Presentation is loading. Please wait.

Presentation is loading. Please wait.

WELCOME to III SEM Date:29.6.15 Class - ECE no of present : no of absent :

Similar presentations


Presentation on theme: "WELCOME to III SEM Date:29.6.15 Class - ECE no of present : no of absent :"— Presentation transcript:

1 WELCOME to III SEM Date:29.6.15 Class - ECE no of present : no of absent :

2 SUB : OBJECT ORIENTED PROGRAMMING AND DATA STRUCTURES Code :EC6301 Handle by B.Sathya Date:29.6.15 Class - ECE no of present : no of absent :

3 AIM To understand the concepts of Object oriented programming & learn to write simple applications using C++. OBJECTIVES To comprehend the fundamentals of object oriented programming, particularly in C++. To use object oriented programming to implement data structures. To introduce linear, non-linear data structures and their applications. Date:30.6.14 no of present : no of absent :

4 SYLLABUS Date:29.6.15 no of present : no of absent :

5 Overview of C++ Structures Class Scope and Accessing Class Members Reference Variables Initialization Constructors Destructors Member Functions and Classes Friend Function Dynamic Memory Allocation Static Class Members Container Classes and Integrators Proxy Classes Overloading: (Function overloading and Operator overloading) Date:29.6.15 no of present : no of absent : UNIT I - DATA ABSTRACTION & OVERLOADING

6 Base Classes and Derived Classes Protected Members Casting Class pointers and Member Functions Overriding Public, Protected and Private Inheritance Constructors and Destructors in derived Classes Implicit Derived Class Object To Base Class Object Conversion Composition Vs. Inheritance Virtual functions – This Pointer Abstract Base Classes and Concrete Classes – Virtual Destructors – Dynamic Binding. Date: 29.6.15 no of present : no of absent : UNIT II - INHERITANCE & POLYMORPHISM

7 Abstract Data Types (ADTs) List ADT array-based implementation linked list implementation singly linked lists Polynomial Manipulation Stack ADT – Queue ADT Evaluating arithmetic expressions Date:29.6.15 no of present : no of absent : UNIT III - LINEAR DATA STRUCTURES

8 Trees Binary Trees Binary tree representation and traversals Application of trees: Set representation and Union Find operations – Graph and its representations Graph Traversals – Representation of Graphs Breadth-first search – Depth-first search Connected components. Date:29.6.15 no of present : no of absent : UNIT IV - NON-LINEAR DATA STRUCTURES

9 Sorting algorithms:  Insertion sort  Quick sort  Merge sort Searching:  Linear search  Binary Search UNIT V - SORTING and SEARCHING Date:29.6.15 no of present : no of absent :

10 TEXT BOOK: 1. Deitel and Deitel, “C++, How To Program”, Fifth Edition, Pearson Education, 2005. 2. Mark Allen Weiss, “Data Structures and Algorithm Analysis in C++”, Third Edition, Addison-Wesley, 2007. REFERENCES: 1. Bhushan Trivedi, “Programming with ANSI C++, A Step-By-Step approach”, Oxford University Press, 2010. 2. Goodrich, Michael T., Roberto Tamassia, David Mount, “Data Structures and Algorithms in C++”, 7th Edition, Wiley. 2004. 3. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein, "Introduction to Algorithms", Second Edition, Mc Graw Hill, 2002. 4. Bjarne Stroustrup, “The C++ Programming Language”, 3rd Edition, Pearson Education, 2007. Date:29.6.15 no of present : no of absent :

11 ▪ UNIT I - DATA ABSTRACTION & OVERLOADING Procedural Programming ▪ Programs are in the form of subroutine and the data items are global ▪ Program controls are jumps and call to subroutines ▪ E.g.., FORTRAN, COBOL Structured Programming ▪ Structured design: – Dividing a problem into smaller sub problems ▪ Program consists of multiple modules and each has a set of functions ▪ The structured design approach is also called – Top-down design – Modular programming Date:29.6.15 no of present : no of absent :

12 Object-Oriented Programming  The decomposition of a problem into number of entities called objects  It builds data (attributes) and functions (behavior) into these objects  It is based on certain concepts as shown in fig. Date:29.6.15 no of present : no of absent :

13 Before starting to learn C++ it is essential to have a basic knowledge of the concepts of Object oriented programming. Some of the important object oriented features are namely:  Objects  Classes  Inheritance  Data Abstraction  Data Encapsulation  Polymorphism  Overloading  Reusability Date:29.6.15 no of present : no of absent :

14 Objects:  Object is the basic unit of object-oriented programming.  Objects are identified by its unique name.  An object represents a particular instance of a class.  There can be more than one instance of a class.  Each instance of a class can hold its own relevant data.  An Object is a collection of data members and associated  member functions also known as methods. Date:29.6.15 no of present : no of absent :

15 Classes :  Classes are data types based on which objects are created.  Objects with similar properties and methods are grouped together to form a Class.  Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties.  For example consider we have a Class of Cars under which Santro Xing, Alto and Wagan Represents individual Objects.  In this context each Car Object will have its own, Model, Year of Manufacture, Color, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, and Stop form the Methods of Car Class.  No memory is allocated when a class is created.  Memory is allocated only when an object is created, i.e., when an instance of a class is created. Date:29.6.15 no of present : no of absent :

16 ▪ //program to read employee details and to output the data ▪ /////code begins here ///// ▪ #include // Preprocessor directiveinclude ▪ using namespace std; ▪ class employee // Class Declaration ▪ { ▪ Private: ▪ char empname[50]; ▪ int empno; ▪ ▪ public: ▪ void getvalue() ▪ { ▪ cout<<"INPUT Employee Name:"; ▪ cin>>empname; // waiting input from the Keyboard for the name Date:29.6.15 no of present : no of absent : A sample program to understand the basic structure of C++

17 ▪ cout<<"INPUT Employee Number:"; ▪ cin>>empno; // waiting input from the Keyboard for the number ▪ } ▪ void displayvalue(){ ▪ cout<<"Employee Name:"<< empname << endl; // displays the employee name ▪ cout<<"Employee Number:"<< empno << endl; // displays the emloyee number ▪ } ▪ }; ▪ void main() ▪ { ▪ employee e1; // Creation of Object ▪ e1.getvalue(); // the getvalue method is being called ▪ e1.displayvalue(); // the displayvalue method is being called ▪ } ▪ ///// code ends here ////// Date:29.6.15 no of present : no of absent :

18 ▪ URLS http://www.desy.de/gna/html/cc/Tutorial/tutorial.html http://www.tenouk.com/cplusplustutorial.html http://www.adobe.com/devnet/actionscript/learning/oop-concepts/inheritance.html http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming- Concep http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming- Concep http://datastructures.itgo.com/appendix.htm http://www.academictutorials.com/data-structure/data-structure-linear.asp http://groups.engin.umd.umich.edu/CIS/course.des/cis350/notes/page2.html http://www.seas.gwu.edu/~ayoussef/cs103/ Date:29.6.15 no of present : no of absent :

19 SEMINAR TOPICS: Control Structures Manipulating strings Lists Topological sort Merge sort Quick sort Date:29.6.15 no of present : no of absent :

20 ASSIGNMENT TOPICS: Virtual functions and polymorphism Classes and objects AVL trees Stacks and queues Quick sort Searching Date: 30.06.14 no of present : no of absent :

21 Queries ???????? Date:29.6.15 no of present : no of absent :

22 Thank you Date:29.6.15 no of present : no of absent :


Download ppt "WELCOME to III SEM Date:29.6.15 Class - ECE no of present : no of absent :"

Similar presentations


Ads by Google