• Post category:StudyBullet-4
  • Reading time:6 mins read


Learn how to write your own classes and create objects from them.

What you will learn

Create classes

Instantiate Objects

Create Methods

Add Properties to classes

Create Abstract Classes and Methods

Implement Encapsulation

Implement Inheritance

Override Methods

Create child or derived classes

Description

object-oriented programming is an approach to programming that

breaks a programming problem into objects that interact with each other.


Get Instant Notification of New Courses on our Telegram channel.


Objects are created from templates known as classes. You can think of a class as

the blueprint of a building. An object is the actual β€œbuilding” that we build based

on the blueprint.

C# is an object-oriented programming language. The four basic principles of object-oriented programming are:

Abstraction Modelling the relevant attributes and interactions of entities as classes to define an abstract representation of a system.

Encapsulation Hiding the internal state and functionality of an object and only allowing access through a public set of functions.

Inheritance Ability to create new abstractions based on existing abstractions.

Polymorphism Ability to implement inherited properties or methods in different ways across multiple abstractions.

Object oriented programming (OOP) is a programming structure where programs are organized around objects as opposed to action and logic. This is essentially a design philosophy that uses a different set of programming languages such as C#. Understanding OOP concepts can help make decisions about how you should design an application and what language to use.

Everything in OOP is placed together as self-sustainable β€œobjects.” An object is a combination of variables, functions, and data that performs a set of related activities. When the object performs those activities, it defines the object’s behaviour. In addition, an object is an instance of a class.

English
language

Content

Visual Studio Setup

Introduction
What is C#
Installing Visual Studio
Visual studio workload

Object oriented programming (OOP)

What is OOP
Creating your own classes
Adding fields to classes & Encapsulation
Adding properties to fields
Auto -implemented properties
Adding methods to classes
Overloading
Overriding ToString() Method
Contructors
Instantiating Objects
Static Keywords
Inheritance: Creating Parent Class
Inheritance and creating child classes
Inheritance and writing code for the main method
Polymorphism
GetType() and typeof() method
Abstract Classes and Methods