c++ practical

4
Lovely Professional University, Punjab Course Code Course Title Course Planner Lectures Tutorials Practicals Credits CSE202P OBJECT ORIENTED PROGRAMMING 15121::Amita Dhiman 0.0 0.0 3.0 2.0 Course Category Practical Course TextBooks Sr No Title Author Edition Year Publisher Name T-1 WorkBook on C++ Sumit Mittu 1st Cengage Learning Reference Books Sr No Title Author Edition Year Publisher Name R-1 Computer Science - A Structured Approach using C++ Behrouz A. Forouzan and Richard F. Gilberg 2nd Cengage Learning R-2 Programming with C++ D Ravichandran 3rd Mc graw Hill R-3 Object Oriented Programming with C ++ E. Balagurusamy 4th Prentice Hall R-4 The Annotated C++ Reference Manual J Marget A. Ellis and Bjarne Stroustrup 2nd Addison Wisely R-5 C++ Primer Lippman F. B 4th Addison Wisely R-6 Teach Yourself C++ Herbert Schildt 3rd Tata McGraw Hill R-7 Object oriented Programming with ANSI and Turbo C++ Kamthane, Ashok N. 2nd Pearson Education Other Reading Sr No Journals articles as Compulsary reading (specific articles, complete reference) OR-1 http://drdobbs.com/cpp , OR-2 http://www.artima.com/cppsource , Relevant Websites Sr No (Web address) (only if relevant to the course) Salient Features RW-1 http://cplus.about.com About C, C++ and C# brings the latest programming tutorials, programming challenges,C++ for beginners RW-2 http://www.icce.rug.nl/documents/cplusplus This document is intended for knowledgeable users of C (or any other language using a C-like RW-3 http://www.cplusplus.com/doc/tutorial/ These tutorials explain the C++ language from its basics up to the newest features of ANSI-C++ RW-4 http://www.coolinterview.com Various interview based questions

Upload: mayank-maurya

Post on 19-Oct-2015

20 views

Category:

Documents


4 download

DESCRIPTION

practical book of c++

TRANSCRIPT

  • Lovely Professional University, PunjabCourse Code Course Title Course Planner Lectures Tutorials Practicals CreditsCSE202P OBJECT ORIENTED PROGRAMMING 15121::Amita Dhiman 0.0 0.0 3.0 2.0Course Category Practical Course

    TextBooks Sr No Title Author Edition Year Publisher NameT-1 WorkBook on C++ Sumit Mittu 1st Cengage Learning

    Reference BooksSr No Title Author Edition Year Publisher NameR-1 Computer Science - A Structured

    Approach using C++Behrouz A. Forouzan and Richard F. Gilberg

    2nd Cengage Learning

    R-2 Programming with C++ D Ravichandran 3rd Mc graw HillR-3 Object Oriented Programming with C

    ++E. Balagurusamy 4th Prentice Hall

    R-4 The Annotated C++ Reference Manual

    J Marget A. Ellis and Bjarne Stroustrup

    2nd Addison Wisely

    R-5 C++ Primer Lippman F. B 4th Addison WiselyR-6 Teach Yourself C++ Herbert Schildt 3rd Tata McGraw HillR-7 Object oriented Programming with

    ANSI and Turbo C++Kamthane, Ashok N. 2nd Pearson Education

    Other Reading

    Sr No Journals articles as Compulsary reading (specific articles, complete reference)OR-1 http://drdobbs.com/cpp ,

    OR-2 http://www.artima.com/cppsource ,

    Relevant WebsitesSr No (Web address) (only if relevant to the course) Salient FeaturesRW-1 http://cplus.about.com About C, C++ and C# brings the latest programming tutorials,

    programming challenges,C++ for beginnersRW-2 http://www.icce.rug.nl/documents/cplusplus This document is intended for knowledgeable users of C (or any other

    language using a C-likeRW-3 http://www.cplusplus.com/doc/tutorial/ These tutorials explain the C++ language from its basics up to the newest

    features of ANSI-C++RW-4 http://www.coolinterview.com Various interview based questions

  • Audio Visual AidsSr No (AV aids) (only if relevant to the course) Salient FeaturesAV-1 http://nptel.iitm.ac.in/video.php?subjectId=106102067 To maintain a high level of interest in the lesson

    Software/Equipments/Databases

    Sr No (S/E/D) (only if relevant to the course) Salient FeaturesSW-1 Dev-C++ Software to develop C++ programs

    Virtual Labs

    Sr No (VL) (only if relevant to the course) Salient FeaturesVL-1 http://deploy.virtual-labs.ac.in/labs/cse01/index.php Virtual Lab source

    Detailed Plan For Practicals

    Practical No Broad topic (Subtopic) Practical Description Learning Outcomes Equipment UsedPractical 1 Basics of C++(Programs using Arrays

    and their variants)Programs of using variablles and arrays To program using array data structure Dev-C++,PCs,LCD Projectors,

    Basics of C++(Programs using pointers,refrence and their variants in C++)

    Pointers and Refrence variables To exemplify pointers and refrence variables

    Dev-C++,PCs,LCD Projectors,

    Practical 2 Basics of C++(Programs in C++ implementing sequence, selection, looping and jumping control)

    Decision Making To able to use branching and looping Dev-C++,PCs,LCD Projectors,

    Practical 3 Functions and Structures(Programs to implement Recursion, Function Overloading.)

    Recusrion To be able to find factorial and Fibonacci using recursion

    Dev-C++,PCs,LCD Projectors,

    Functions and Structures(Programs to implement Pointer to Functions and their variants.)

    variants of functions To be able to program in modular fashion

    Dev-C++,PCs,LCD Projectors,

    *Each experiment of the lab will be evaluated using following relative scheme:Component % of Marks

    J/E 50

    WR 20

    VIVA 30

  • Practical 4 Functions and Structures(Programs to implement structures, unions,enumerations and Typedef statement)

    Structures in oops To be able to program using one data type that is Enum

    Dev-C++,PCs,LCD Projectors,

    Functions and Structures(Programs to implement Functions , Inline Functions.)

    Functions types To understand the importance of inline function

    Dev-C++,PCs,LCD Projectors,

    Practical 5 Classes and Objects(Programs to implement Constructor and Destructor with their variants)

    Manager Functions To be able to use construct and Destructor in program

    Dev-C++,PCs,LCD Projectors,

    Classes and Objects(Programs to implement Inline and Non-inline member functions, Static data members & static member functions, Initializer lists)

    Data Members and Member Functions To be able to develop program using member functions

    Dev-C++,PCs,LCD Projectors,

    Classes and Objects(Programs to implement Array of objects, Classes containing pointers, Pointer to objects, the this pointer)

    Collection of objects To develop a program using objects and pointers

    Dev-C++,PCs,LCD Projectors,

    Practical 6 Classes and Objects(Programs to implement friend functions and friend classes)

    Friend Function To access the private members of the classes

    Dev-C++,PCs,LCD Projectors,

    Classes and Objects(Programs implementing classes and objects with various members variants)

    Member Functions Program using Various member variants in classes

    Dev-C++,PCs,LCD Projectors,

    Practical 7 Operator Overloading and Inheritance(Programs to implement type conversion(From basic to class type,class type to basic type and class type to another class type))

    Type conversion To implement type conversions Dev-C++,PCs,LCD Projectors,

    Operator Overloading and Inheritance(Programs to implement inheritance with different Modes(public,private and Protected).)

    Access specifiers To specify the accessibility of various member variants

    Dev-C++,PCs,LCD Projectors,

    Operator Overloading and Inheritance(Programs to implement overriding Member Functions ,constructors and destructors of base class)

    Function overriding To reuse the member functions Dev-C++,PCs,LCD Projectors,

    Operator Overloading and Inheritance(Programs to implement Aggregation concepts)

    Aggregation To exemplify aggregation Dev-C++,PCs,LCD Projectors,

    Practical 8 Operator Overloading and Inheritance(Program to allocate Dynamic Memory ,Virtual Functions and Abstract classes)

    Dynamic memory To allocate memory at run time Dev-C++,PCs,LCD Projectors,

    Operator Overloading and Inheritance(Program to Resolve ambiguities in inheritance)

    Ambiguity resolve To resolve ambiguity in INheritance Dev-C++,PCs,LCD Projectors,

    Operator Overloading and Inheritance(Program to implement operator overloading using unary and Binary operator)

    operator overloading To use same operator for different purpose

    Dev-C++,PCs,LCD Projectors,

  • Practical 9 Data File operations and Templates(Programs to Read and Write a Character from a file)

    File opening and close To implement basic file operations Dev-C++,PCs,LCD Projectors,

    Data File operations and Templates(Programs to implement Binary File operations)

    Binary File operations To program basic binary file operations Dev-C++,PCs,LCD Projectors,

    Data File operations and Templates(Program to implement Classes and File operations)

    Classes and Structures in Files To use classes and Files in File Handling

    Dev-C++,PCs,LCD Projectors,

    Data File operations and Templates(Program to implement Random Acces File processing)

    Updation of file To update file in random manner Dev-C++,PCs,LCD Projectors,

    Practical 10 Data File operations and Templates(Program to implement Function and Class Templates)

    Templates To implement Function and Class types Dev-C++,PCs,LCD Projectors,

    Data File operations and Templates(Program for Exception Handling using try,catch and throw)

    Exception Handling Program to catch and throw exceptions Dev-C++,PCs,LCD Projectors,

    Data File operations and Templates(Programs on Opening and closing of files and Stream state member Functions)

    Basic File operations To get familiar with the opening and closing of files

    Dev-C++,PCs,LCD Projectors,

    SPILL OVERPractical 11 STL-Vector class,Queue class,stack class To be able to work with STL Dev-C++,PCs,LCD Projectors,