Encapsulation

…Encapsulation is one of the benefits…of using object oriented programming languages.…It allows the programmer to hide the definition…of instance data and functions from the user.…This ensures that data structures and operators are used as intended.…Within a class, instance data and functions can be declared…as either private, public or protected, to explicitly enforce encapsulation.…A private member is accessible only to the…functions that are members of the same class.…

A public function of the class is accessible to the calling program.…A protected member is accessible to members…of classes that inherit from the class.…We will talk briefly about inheritance in this course.…Here is a UML diagram of a checking account.…Notice the data members are all marked as private.…This forces the calling program to access the balance…and other data using a function defined in the class.…Below the data members are the functions for this class,…and you can see they are all declared as public.…We have two constructors, three accessor methods and three mutator methods.…

Resume Transcript Auto-Scroll

Author

Released

7/10/2014

C++ is the gold standard for object-oriented programming languages: an efficient, performance-driven language popular in system software, application software, and even video games. It's a must-know for any modern-day programmer. This course will get you up and running fast. Author Peggy Fisher dissects the anatomy of C++, walking through flow-control features like expressions, loops, decisions, and functions, as well as its object-oriented classes and data structures. Peggy also covers file manipulation, error handling, and further resources to get you started on your own.

Topics include:

Downloading and exploring the C++ IDE

Working with loops

Using predefined functions

Creating custom functions

Creating and instantiating classes

Working with external files

Skill Level Beginner

2h 36m

Duration

1,015,640

Views

Show MoreShow Less

Q: How do I upgrade the C++ compiler on Mac OS X and Linux?

A: Refer to C/C++ Essential Training for a detailed look at installing or upgrading the C++ compiler on various platforms.

Q: The link to download the Eclipse IDE in the "Download a C++ IDE" movie doesn't work. Where can I find the IDE?

A: Short URLs are case sensitive and need to be typed in exactly as they appear. Type in or simply click http://goo.gl/CzckWp to visit the Eclipse IDE for C/C++ Developers page.