what is oops concept in c# with examples.
Can any one tell me what is concept of Object Oriented Programming Language with an example.
- 2442 Views
- 4 Answers
-
-
- 09 Jul
- 0 Comment
-
-
OOPS stands for Object Oriented Programming. strongC++ OOPs Concepts/strong. The major purpose of strongC++/strongprogramming is to introduce the strongconcept/strong of object orientation to the C programming language. strongObject Oriented Programming/strong is a paradigm that provides many strongconcepts/strong such as inheritance, data binding, polymorphism etc. The example of inheritence isbr /Considering HumanBeing a class, which has properties like hands, legs, eyes etc, and functions like walk, talk, eat, see etc. Male and Female are also classes, but most of the properties and functions are included in HumanBeing, hence they can inherit everything from class HumanBeing using the concept of strongInheritance/strong.
-
- 06 Jul
- 0 Comment
-
Object oriented programming – As the name suggests uses a rel='nofollow' href="https://www.geeksforgeeks.org/basic-concepts-of-object-oriented-programming-using-c/#objects"objects/a in programming. Object oriented programming aims to implement real world entities like inheritance, hiding, polymorphism etc in programming. The main aim of OOP is to bind together the data and the functions that operates on them so that no other part of code can access this data except that function.br /strongObject: /strongObjects are basic run-time entities in an object oriented system, objects are instances of a class these are defined user defined data types.br /strongClass:/strong Class is a blueprint of data and functions or methods. Class does not take any space.br /strongEncapsulation and Data abstraction:/strong Wrapping up(combing) of data and functions into a single unit is known as encapsulation. The data is not accessible to the outside world and only those functions which are wrapping in the class can access it. This insulation of the data from direct access by the program is called data hiding or information hiding.br /strongInheritance:/strong inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification. Inheritance provides re usability. This means that we can add additional features to an existing class without modifying it.br /strongPolymorphism:/strong polymorphism means ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends upon the types of data used in the operation.