By clicking “Check Writers’ Offers”, you agree to our terms of service and privacy policy. We’ll occasionally send you promo and account related email
No need to pay just yet!
About this sample
About this sample
Words: 641 |
Page: 1|
4 min read
Published: Mar 14, 2019
Words: 641|Page: 1|4 min read
Published: Mar 14, 2019
After studying this book till chapter fourteen, now we are able to write a simple program using C#. The readers need to observe that we write various programs in which we use a structure sounds like class. Then we made a function named main in that class. The class name is based on the name of the project. Why is it so? We need to know about the structure of C#. Basically C# is an object oriented language. Now a new question appears that what is object oriented means? Is this another new language on which C# rely or C# is a derived language from OOP (object oriented programming)? The answer is that OOP is not a language it is just a technique and C# is a programming language which use this technique. In this chapter we will discuss about the OOP and its basic concepts.
OOP (Object oriented programming) is a very vide concept of programming. In this book we are using C# as programming language. That is why it is necessary to know about OOP. OOP is a technique that how to program. It is beneficial as compared to structured approach. It is easy to find bugs and errors if we are using oop. But in structure approach it becomes difficult for a programmer. In structure approach if there is an error occur, the only programmer of that code can find the error or bug and fix it easily, if they try to resolve the error without the developer of that project then it costs much. But in oop this strictness removed. Oop is economical in this manner as compared to structured approach. OOP is a technique totally based on classes and objects.
Object Oriented Basic Concept:
There are some basic concepts of object oriented programming that includes classes, objects, association, composition, aggregation and the main four pillars of OOP which are as follows:
The details of this chapter will be provided in the very next chapter No. 16.
Polymorphism: It is clear from its name polymorphism that something is going same. It give us the facility to create the multiple functions with same name but different parameters providing the different output. A real world example is a family with the same surname. This will be explained later in chapter No. 17.
Defining the classes and objects:
Classes and objects:
Classes are defined as the user defined data types. They explain the types of objects. Sometimes these two terms are used correspondently. But in actual object is an instance of the class. If we take the sketching and painting analogy then the class is only a sketch and the object is a colorful painting of that sketch. If we use construction approach then class is just a blue print and the object is fully prepared building from that blueprint.
Basically, the classes and objects, concept of OOP provides the easiness in coding or developing environment facilitating the coders with the following features:
Browse our vast selection of original essay samples, each expertly formatted and styled