Object-Oriented Programming and Functions
Keep adding new skills with 10,000+ programs for $239 (usually $399). Save now.
Object-Oriented Programming and Functions
This course is part of Become a C++ Pro: The Ultimate Developer Guide Specialization
2,756 already enrolled
Included with
Ask Coursera
Recommended experience
Recommended experience
What you'll learn
Structure C++ programs using modular, reusable functions with proper parameter handling
Design and implement classes with constructors, methods, and encapsulated data
Manage program errors through exception handling and debugging techniques
Use pointers and dynamic memory allocation to build flexible, efficient C++ applications
Skills you'll gain
Tools you'll learn
Details to know
See how employees at top companies are mastering in-demand skills
Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate
There are 4 modules in this course
This course features Coursera Coach!
A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. This course provides a deep dive into C++ functions, object-oriented programming (OOP), exception handling, debugging, and pointers—essential pillars for developing scalable and robust applications. You'll master how to write modular, reusable code using functions and create complex systems using classes and objects grounded in core OOP principles like encapsulation, inheritance, and polymorphism. The journey begins with functions, teaching you prototypes, parameter passing, recursion, and function overloading. You’ll reinforce these concepts with practical projects such as creating a Tic-Tac-Toe game and computing the average of numbers. Then, the course transitions into object-oriented programming, where you'll design custom classes and bring them to life with real-world examples like a Library Card or an Ice Cream Sundae class. Next, you’ll explore exceptions and debugging, learning how to write resilient code through structured error handling, logic checks, and custom exception classes. Finally, the course concludes with a strong foundation in pointers and dynamic memory management, helping you understand how C++ gives you powerful control over system memory. This course is ideal for learners who already understand C++ basics and are ready to take their skills to the next level. It’s perfect for computer science students, aspiring developers, and self-taught programmers aiming for deeper C++ proficiency. A basic understanding of variables, loops, and conditionals in C++ is recommended before enrolling. By the end of the course, you will be able to build and organize C++ programs using reusable functions, design robust object-oriented systems, manage memory with pointers, and handle exceptions gracefully for reliable code execution.
In this module, we will explore the power of functions in C++—a critical tool for writing clean, modular, and maintainable code. You’ll learn how to use parameters, return types, overloading, and recursion while working through hands-on projects like a Tic-Tac-Toe game and array-based calculators. By mastering functions, you’ll build the foundation for structured and reusable code in C++.
What's included
14 videos2 readings1 assignment
14 videos•Total 119 minutes
- Section Overview•2 minutes
- Function Prototypes and Definitions•8 minutes
- Function Return Types and Parameters•10 minutes
- Parameter Passing•13 minutes
- Variable Scope and Lifetime•14 minutes
- Function Overloading•8 minutes
- The Library•7 minutes
- Recursion•17 minutes
- Project - Average of Three•6 minutes
- Project - Count Even Numbers•5 minutes
- Project - Return Product of Elements in an Array Object•5 minutes
- Project - Retrieve Product of Elements by Reference•6 minutes
- Project - Tic-Tac-Toe•15 minutes
- Section Wrap-Up•3 minutes
2 readings•Total 20 minutes
- Introduction to the Course 'Object-Oriented Programming and Functions'•10 minutes
- Full Specialization Recourses•10 minutes
1 assignment•Total 15 minutes
- Functions - Assessment•15 minutes
In this module, we will introduce Object-Oriented Programming and walk through the creation and use of classes and objects in C++. You’ll build real-world examples like a Book class and Ice Cream Sundae class, learning about encapsulation, constructors, destructors, and more. These projects will help you move from procedural to object-oriented thinking in your C++ development.
What's included
11 videos1 assignment
11 videos•Total 124 minutes
- Section Overview•3 minutes
- Basics of Object-Oriented Programming•5 minutes
- Encapsulation•20 minutes
- Separate Compilation•10 minutes
- Constructors and Destructors•14 minutes
- A Rectangle Class•17 minutes
- A Book Class•13 minutes
- Project - A Library Card Class•12 minutes
- Project - An Ice Cream Sundae Class•12 minutes
- Project - A Triangle Class•13 minutes
- Section Wrap-Up•4 minutes
1 assignment•Total 15 minutes
- Introduction to Classes and Objects - Assessment•15 minutes
In this module, we will focus on writing robust C++ programs by mastering exception handling and debugging techniques. You’ll explore the exception hierarchy, learn to rethrow and create custom exceptions, and use debugging tools effectively. Through targeted projects like the Month Names and Custom Exception exercises, you’ll gain confidence in writing error-resilient code.
What's included
10 videos1 assignment
10 videos•Total 95 minutes
- Section Overview•3 minutes
- Exceptions and the Exception Hierarchy•10 minutes
- Logic Errors•8 minutes
- Runtime Errors and Throwing Exceptions•14 minutes
- Rethrowing Exceptions•14 minutes
- Custom Exceptions•11 minutes
- Basic Testing and Debugging Skills•17 minutes
- Project - Month Names•7 minutes
- Project - Creating and Using Your Own Exception•9 minutes
- Section Wrap-Up•3 minutes
1 assignment•Total 15 minutes
- Exceptions and Debugging - Assessment•15 minutes
In this module, we will demystify pointers—one of the most powerful and nuanced features of C++. You’ll learn how pointers work, how to manage dynamic memory, and why const correctness matters. With projects like Dynamically Creating Drones and Exhibits, you'll apply these concepts in meaningful ways that reinforce both theory and practice.
What's included
8 videos1 reading3 assignments
8 videos•Total 84 minutes
- Section Overview•4 minutes
- Pointers•11 minutes
- Dynamic Memory, Part 1•9 minutes
- Dynamic Memory, Part 2•14 minutes
- Const Correctness•17 minutes
- Project - Dynamically Create Exhibits•12 minutes
- Project - Dynamically Create Drones•14 minutes
- Section Wrap-Up•3 minutes
1 reading•Total 10 minutes
- Conclusion to the Course 'Object-Oriented Programming and Functions'•10 minutes
3 assignments•Total 90 minutes
- Pointers - Assessment•15 minutes
- Full Course Assessment•60 minutes
- Full Course Practice Assessment•15 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructor
Explore more from Software Development
- Status: Free TrialM
Microsoft
Course
- Status: Free TrialU
University of Michigan
Course
- Status: Free Trial
Course
- Status: Free TrialU
University of London
Course
Why people choose Coursera for their career
Frequently asked questions
Object-Oriented Programming (OOP) is a programming paradigm that organizes code into objects, which are instances of classes. OOP helps in managing complex software projects by promoting modularity, reusability, and easier maintenance. It’s highly relevant because it allows developers to design software that is more flexible, scalable, and easier to maintain. Understanding OOP is essential for anyone pursuing a career in software development, especially in fields like game development, application design, and large-scale system engineering.
The "Object-Oriented Programming and Functions" course introduces you to core OOP concepts and function usage in C++. It covers topics such as functions, recursion, function overloading, and variable scope, as well as OOP principles like encapsulation, constructors, and destructors. The course also includes hands-on projects where you will design and implement classes and objects, create custom exceptions, and work with dynamic memory using pointers, giving you practical experience in writing clean and efficient C++ code.
Upon completion of this course, you'll be proficient in using functions and object-oriented techniques in C++. You’ll be able to design and implement classes, manage memory dynamically with pointers, handle exceptions, and debug code effectively. Additionally, you’ll be able to solve real-world problems using recursion, function overloading, and object-oriented principles, which are fundamental in modern software development.
More questions
Financial aid available,
