Object Oriented Programming using C++ Laboratory Notes
Subject Overview
The practical companion to Object Oriented Programming using C++, covering fundamental I/
Subject at a glance
1
Units
22
Topics
2
Credits
1
Infographics
Unit-wise Syllabus
1 units — open any unit for detailed topic-wise notes, diagrams and important exam questions
- Formatted I/O
- prime/even/odd number display
- Fibonacci series
- result computation with nested if
- factorial via iteration and recursion
- switch-based weekday display
- largest/smallest of three
- pointer address and content display
- reference-based value swap
- palindrome checking
- string sorting and copying
- array sorting
- class-based arithmetic and pointer member access
- friend functions
- copy constructors
- function overloading
- abstract classes
- virtual functions
- single and multilevel inheritance
- unary and binary operator overloading
- function overloading for triangle area
- file case conversion and file copying
Virtual function
virtual void show();
Derived class version called through a base pointer
Pure virtual function
virtual void show() = 0;
Must be overridden
Abstract class
Has at least one pure virtual function
Cannot be instantiated
Study guide
In this lab you write C++ programs on formatted I/O, number problems, factorial, switch, pointers and references, palindromes, strings, arrays, classes with pointer members, friend functions, copy constructors, overloading, abstract classes, virtual functions and single and multilevel inheritance. Explain which OOP idea each program shows.
Why Object Oriented Programming using C++ Laboratory Matters
These are the standard programs in OOP practical exams and in interview questions.
How to Prepare for Object Oriented Programming using C++ Laboratory
- Write programs yourself and then vary them.
- Relate each program to the OOP concept.
- Prepare short viva answers.
Object Oriented Programming using C++ Laboratory: Frequently Asked Questions
What programs are in the C++ lab?
Basic programs, strings, arrays, classes, constructors, overloading, virtual functions and inheritance.
