Back to Browse

7 C++ OOP Course 05 - Classes, Encapsulation, Public interface, Throw exceptions

1.1K views
Feb 7, 2022
1:40:38

Presentation from the Object Oriented Programming in C++ course Examples available on https://github.com/catalinboja/cpp-2021 Students are require to go through the course materials as the presentation covers only parts of the course discussions (sometimes the recording was paused or stopped) Thanks to all students for their questions and interventions. Remember, that there are no wrong/stupid questions. Only the answers can be. Contents: 0:00:00 Don't forget the trailing ; after the class definition 0:03:00 String objects and Defining the Student class 0:12:20 Controlling access to the class attributes - encapsulation and access specifiers 0:22:48 The class public interface. Controlling access to attributes 0:29:35 Calling class methods (non-static ones) 0:32:32 Understanding the role of "this" pointer in class methods 0:40:00 The arrow vs . (dot) operator. Pointer to objects vs objects 0:45:41 Remember the default values you get in VS 0:47:10 Providing get interface for the other attributes 0:52:07 The default 0xCC effect on char arrays 0:56:51 Don't return pointers to your attributes 1:07:18 The set methods. The write interface 1:12:26 Always validate the input (especially in set methods) 1:15:58 How to handle invalid data in set or other methods ? Throw errors 1:25:44 Set interface for boolean attributes 1:29:08 Set interface for static char arrays 1:32:36 The class constructor

Download

0 formats

No download links available.

7 C++ OOP Course 05 - Classes, Encapsulation, Public interface, Throw exceptions | NatokHD