The "Understand encapsulation" module provides you with the instructions and devices to develop your hands on skills in the following topics: Access modifiers and encapsulation, Interfaces.
The Understand encapsulation module provides you with the instructions and devices to develop your hands on skills in the following topics.
- Access modifiers and encapsulation
Exercise 1 - Using Encapsulation
In this exercise, you will learn to create a class that demonstrates the concept of using various C# access modifiers to demonstrate the concept of encapsulation.
Encapsulation, in object oriented programming, is a process of binding together all the data members such as variables, properties and methods into a single unit. The best example of encapsulation in C# is a class.
Exercise 2 - Working with Interfaces
In this exercise, you will learn to create a new interface in C#.
An interface contains only the signatures or declarations of properties, methods and events. The classes that are derived from the interface must define the members. You can declare an interface using the “interface” word. It is similar to a class declaration. Interface statements are public by default.
IT & Cybersecurity certification hands on practice labs and practice exams for certifications and skill development.
See the full benefits of our immersive learning experience with interactive courses and guided career paths.