Skip to content

Feroz455/Object-Oriented-Programming-with-C-Plus-plus-by-BALAGURUSAMY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 Object-Oriented Programming with C++ by E. Balagurusamy

Complete Chapter-by-Chapter Implementation Guide (4th Edition)

C++ OOP Textbook License

πŸ“– Overview

This repository contains complete C++ implementations of all programs and examples from "Object-Oriented Programming with C++ (4th Edition)" by E. Balagurusamy. It serves as a practical coding companion to the textbook, providing working implementations for students and educators covering all 16 chapters of OOP concepts.


πŸ“š Complete Chapter & Sub-Chapter Index

Chapter 1: Principles of Object-Oriented Programming

1.1 Software Crisis
1.2 Software Evolution
1.3 A Look at Procedure-Oriented Programming
1.4 Object-Oriented Programming Paradigm
1.5 Basic Concepts of Object-Oriented Programming
1.6 Benefits of OOP
1.7 Object-Oriented Languages
1.8 Applications of OOP
πŸ“š Summary | Review Questions

Chapter 2: Beginning with C++

2.1 What is C++?
2.2 Applications of C++
2.3 A Simple C++ Program
2.4 More C++ Statements
2.5 An Example with Class
2.6 Structure of C++ Program
2.7 Creating the Source File
2.8 Compiling and Linking
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 3: Tokens, Expressions and Control Structures

3.1 Introduction
3.2 Tokens
3.3 Keywords
3.4 Identifiers and Constants
3.5 Basic Data Types
3.6 User-Defined Data Types
3.7 Derived Data Types
3.8 Symbolic Constants
3.9 Type Compatibility
3.10 Declaration of Variables
3.11 Dynamic Initialization of Variables
3.12 Reference Variables
3.13 Operators in C++
3.14 Scope Resolution Operator
3.15 Member Dereferencing Operators
3.16 Memory Management Operators
3.17 Manipulators
3.18 Type Cast Operator
3.19 Expressions and their Types
3.20 Special Assignment Expressions
3.21 Implicit Conversions
3.22 Operator Overloading
3.23 Operator Precedence
3.24 Control Structures
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 4: Functions in C++

4.1 Introduction
4.2 The Main Function
4.3 Function Prototyping
4.4 Call by Reference
4.5 Return by Reference
4.6 Inline Functions
4.7 Default Arguments
4.8 const Arguments
4.9 Function Overloading
4.10 Friend and Virtual Functions
4.11 Math Library Functions
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 5: Classes and Objects

5.1 Introduction
5.2 C Structures Revisited
5.3 Specifying a Class
5.4 Defining Member Functions
5.5 A C++ Program with Class
5.6 Making an Outside Function Inline
5.7 Nesting of Member Functions
5.8 Private Member Functions
5.9 Arrays within a Class
5.10 Memory Allocation for Objects
5.11 Static Data Members
5.12 Static Member Functions
5.13 Arrays of Objects
5.14 Objects as Function Arguments
5.15 Friendly Functions
5.16 Returning Objects
5.17 const Member Functions
5.18 Pointers to Members
5.19 Local Classes
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 6: Constructors and Destructors

6.1 Introduction
6.2 Constructors
6.3 Parameterized Constructors
6.4 Multiple Constructors in a Class
6.5 Constructors with Default Arguments
6.6 Dynamic Initialization of Objects
6.7 Copy Constructor
6.8 Dynamic Constructors
6.9 Constructing Two-dimensional Arrays
6.10 const Objects
6.11 Destructors
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 7: Operator Overloading and Type Conversions

7.1 Introduction
7.2 Defining Operator Overloading
7.3 Overloading Unary Operators
7.4 Overloading Binary Operators
7.5 Overloading Binary Operators Using Friends
7.6 Manipulation of Strings Using Operators
7.7 Rules for Overloading Operators
7.8 Type Conversions
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 8: Inheritance: Extending Classes

8.1 Introduction
8.2 Defining Derived Classes
8.3 Single Inheritance
8.4 Making a Private Member Inheritable
8.5 Multilevel Inheritance
8.6 Multiple Inheritance
8.7 Hierarchical Inheritance
8.8 Hybrid Inheritance
8.9 Virtual Base Classes
8.10 Abstract Classes
8.11 Constructors in Derived Classes
8.12 Member Classes: Nesting of Classes
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 9: Pointers, Virtual Functions and Polymorphism

9.1 Introduction
9.2 Pointers
9.3 Pointers to Objects
9.4 this Pointer
9.5 Pointers to Derived Classes
9.6 Virtual Functions
9.7 Pure Virtual Functions
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 10: Managing Console I/O Operations

10.1 Introduction
10.2 C++ Streams
10.3 C++ Stream Classes
10.4 Unformatted I/O Operations
10.5 Formatted Console I/O Operations
10.6 Managing Output with Manipulators
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 11: Working with Files

11.1 Introduction
11.2 Classes for File Stream Operations
11.3 Opening and Closing a File
11.4 Detecting end-of-file
11.5 More about Open(): File Modes
11.6 File Pointers and Their Manipulations
11.7 Sequential Input and Output Operations
11.8 Updating a File: Random Access
11.9 Error Handling During File Operations
11.10 Command-line Arguments
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 12: Templates

12.1 Introduction
12.2 Class Templates
12.3 Class Templates with Multiple Parameters
12.4 Function Templates
12.5 Function Templates with Multiple Parameters
12.6 Overloading of Template Functions
12.7 Member Function Templates
12.8 Non-Type Template Arguments
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 13: Exception Handling

13.1 Introduction
13.2 Basics of Exception Handling
13.3 Exception Handling Mechanism
13.4 Throwing Mechanism
13.5 Catching Mechanism
13.6 Rethrowing an Exception
13.7 Specifying Exceptions
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 14: Introduction to the Standard Template Library

14.1 Introduction
14.2 Components of STL
14.3 Containers
14.4 Algorithms
14.5 Iterators
14.6 Application of Container Classes
14.7 Function Objects
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 15: Manipulating Strings

15.1 Introduction
15.2 Creating (string) Objects
15.3 Manipulating String Objects
15.4 Relational Operations
15.5 String Characteristics
15.6 Accessing Characters in Strings
15.7 Comparing and Swapping
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises

Chapter 16: New Features of ANSI C++ Standard

16.1 Introduction
16.2 New Data Types
16.3 New Operators
16.4 Class Implementation
16.5 Namespace Scope
16.6 Operator Keywords
16.7 New Keywords
16.8 New Headers
πŸ“š Summary | Review Questions | Debugging Exercises | Programming Exercises


πŸ—οΈ Repository Structure

Object-Oriented-Programming-with-C-Plus-plus-by-BALAGURUSAMY/
β”‚
β”œβ”€β”€ Chapter 01/          # Principles of Object-Oriented Programming
β”œβ”€β”€ Chapter 02/          # Beginning with C++
β”œβ”€β”€ Chapter 03/          # Tokens, Expressions and Control Structures
β”œβ”€β”€ Chapter 04/          # Functions in C++
β”œβ”€β”€ Chapter 05/          # Classes and Objects
β”œβ”€β”€ Chapter 06/          # Constructors and Destructors
β”œβ”€β”€ Chapter 07/          # Operator Overloading and Type Conversions
β”œβ”€β”€ Chapter 08/          # Inheritance: Extending Classes
β”œβ”€β”€ Chapter 09/          # Pointers, Virtual Functions and Polymorphism
β”œβ”€β”€ Chapter 10/          # Managing Console I/O Operations
β”œβ”€β”€ Chapter 11/          # Working with Files
β”œβ”€β”€ Chapter 12/          # Templates
β”œβ”€β”€ Chapter 13/          # Exception Handling
β”œβ”€β”€ Chapter 14/          # Introduction to the Standard Template Library
β”œβ”€β”€ Chapter 15/          # Manipulating Strings
β”œβ”€β”€ Chapter 16/          # New Features of ANSI C++ Standard
β”œβ”€β”€ LICENSE
└── README.md

πŸ“Š Implementation Status

Chapter Title Status Files Last Updated
01 Principles of OOP βœ… Complete Theoretical concepts May 30, 2021
02 Beginning with C++ βœ… Complete Basic programs May 30, 2021
03 Tokens & Control Structures βœ… Complete Multiple programs May 30, 2021
04 Functions in C++ βœ… Complete Function examples May 31, 2021
05 Classes and Objects βœ… Complete Class implementations May 31, 2021
06 Objects and Classes βœ… Complete Object programs Jun 1, 2021
07 Arrays and Strings βœ… Complete Array/string programs Dec 5, 2021
08 Inheritance βœ… Complete Inheritance examples Jun 8, 2021
09 Pointers & Polymorphism βœ… Complete Pointer programs Jun 9, 2021
10 Console I/O βœ… Complete I/O operations Jun 10, 2021
11 Working with Files βœ… Complete File handling Jun 14, 2021
12 Templates βœ… Complete Template programs Jun 24, 2021
13 Exception Handling βœ… Complete Exception examples Jun 25, 2021
14 STL Introduction βœ… Complete STL programs Jun 26, 2021
15 Manipulating Strings βœ… Complete String programs Jun 26, 2021
16 New ANSI C++ Features βœ… Complete New feature demos Jun 27, 2021

Repository Statistics:

  • Total Chapters: 16 (Complete implementation)
  • Total Sub-Chapters: 150+ detailed sections
  • Primary Language: C++ (100%)
  • Total Commits: 19
  • First Commit: May 30, 2021
  • Last Update: Dec 5, 2021
  • Edition: Based on 4th Edition of Balagurusamy textbook

🎯 Learning Progression

Phase 1: Fundamentals (Chapters 1-4)

  • Week 1-2: OOP principles and C++ basics
  • Week 3-4: Control structures and functions
  • Focus: Building programming foundation

Phase 2: Core OOP (Chapters 5-9)

  • Week 5-6: Classes, objects, constructors/destructors
  • Week 7-8: Operator overloading, inheritance, polymorphism
  • Focus: Mastering object-oriented design

Phase 3: Advanced Features (Chapters 10-16)

  • Week 9-10: I/O operations, file handling, templates
  • Week 11-12: Exception handling, STL, strings, new features
  • Focus: Professional C++ development

πŸš€ Getting Started

Quick Compilation Examples:

# Compile a basic class example
g++ -std=c++11 "Chapter 05/5.5_class_program.cpp" -o class_demo

# Compile inheritance example
g++ -std=c++11 "Chapter 08/8.3_single_inheritance.cpp" -o inheritance_demo

# Compile template example
g++ -std=c++11 "Chapter 12/12.2_class_template.cpp" -o template_demo

Recommended Study Path:

  1. Start with Chapter 2 for C++ basics if you're new to programming
  2. Study Chapter 1 for OOP theory foundation
  3. Follow chapter order (3-16) for progressive learning
  4. Practice with debugging and programming exercises

πŸ”§ How to Navigate the Code

  1. Find a topic in the Chapter Index above
  2. Navigate to the corresponding chapter folder
  3. Look for files named by section number or topic
  4. Compile and run to see the implementation

File Naming Convention (Suggested):

  • Chapter_XX/XX.YY_topic_name.cpp (e.g., Chapter_05/5.15_friendly_functions.cpp)
  • Chapter_XX/exercise_XX.cpp for programming exercises
  • Chapter_XX/debug_XX.cpp for debugging exercises

🀝 Contributing

Areas for Contribution:

  1. Add missing implementations for specific sub-chapters
  2. Improve code comments and documentation
  3. Add test cases for existing programs
  4. Update to modern C++ standards (C++14/17/20)
  5. Create example outputs in comments

Contribution Guidelines:

  • Follow consistent naming conventions
  • Include comments explaining key concepts
  • Reference the textbook section number
  • Test code before submitting

πŸ“š Textbook Reference

  • Title: Object-Oriented Programming with C++
  • Author: E. Balagurusamy
  • Edition: Fourth Edition
  • Publisher: McGraw Hill Education
  • Total Chapters: 16 + Appendices
  • Total Pages: 600+ pages of comprehensive OOP coverage

πŸ’‘ "The best way to learn object-oriented programming is to write object-oriented programs."

Happy OOP Learning! πŸš€

Complete implementations of all 16 chapters from Balagurusamy's 4th Edition

Maintainer: Feroz455 | Based on "Object-Oriented Programming with C++ (4th Edition)" by E. Balagurusamy

About

Complete C++ implementations from Balagurusamy's "Object-Oriented Programming with C++" 4th Edition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages