Learn about Class, Object and Instance in object-oriented programming

In the framework of this article, we will take a look at some really basic concepts in object-oriented programming (OOP) that learners need to understand, thereby understanding how the Class works. and wider is how OOP works.

The truth is that the disjoint between the philosophical aspect of development and the actual mechanical activities of computers in object-oriented programming often creates confusion.These two concepts can be distinguished as follows:

The basic concept of OOP is: Class >> Object >> Instance.

Class is like a blueprint.Objects are real objects built on this design (like a house).The instance is a virtual (non-real) copy of Object.

The following sentences often cause confusion for learners by the terms being mixed and combined together in non-intuitive ways:

The first argument that init () receives is used to denote the instance object.

But it is much easier to understand if you interpret the sentence in the following way:

A detailed design for the house is like describing a class. All the houses built on that design are objects of the class. A specific house is an instance.

Finally, try to remember the following when object-oriented programming:

The main difference between a function and a class is: The function is 'floated' comfortably without obstruction.While for Class (instance) must know its parent class (properties of the parent class), so you need to know the methods of reference to the parent class of the class.It is just a small underground rule that you must grasp before going into OOP.Many programming languages ​​use slick syntax instead of simple simplicity, if you are tired of it, you can try Python, this programming language that values ​​simplicity and accessibility for user.

See more:

  1. Beginners of computer programming need to focus on what?
  2. 8 websites that help programmers practice coding skills
  3. Object-oriented programming in PHP
4.7 ★ | 3 Vote

May be interested

  • What do you know about C # P3 programming language?What do you know about C # P3 programming language?
    c # is an object-oriented programming language developed by microsoft, the start of their .net plan. please invite the network administrator to learn about this topic through the quiz below.
  • Calculate inheritance in C #Calculate inheritance in C #
    one of the most important concepts in object-oriented programming is inheritance. inheritance allows us to define a class in terms of another class, which makes it easier to create and maintain an application. this also provides an opportunity to reuse code features and faster execution time.
  • Access Modifier for class in C ++Access Modifier for class in C ++
    data hiding is one of the important features of object-oriented programming that allows to prevent the function of a program from directly accessing the internal representation of a class type.
  • What do you know about Smalltalk programming language?What do you know about Smalltalk programming language?
    smalltalk is the first, dynamically and reflexively object-oriented programming language developed at xerox palo alto research center (parc) in early 1970. the quiz below is with network administrator. let's learn more about this programming language.
  • How to Write Your First Program in JavaHow to Write Your First Program in Java
    java is an object-oriented programming language created in 1995 by james gosling, which means that it represents concepts as 'objects' with 'fields' (which are attributes that describe the object) and 'methods' (actions that the object can...
  • Ruby programming language for beginnersRuby programming language for beginners
    a battle is going on between ruby and python programming languages. these two big rivals have a large community behind and both are popular languages ​​for web development. in this article, tipsmake.com will help readers become familiar with ruby language - one of the extremely effective object-oriented programming languages.
  • Class (Class) in C #Class (Class) in C #
    when you define a class in c #, you define a blueprint for a data type. this does not really define any data, but it defines the meaning of that class name. that is, what an object of that class consists of, what activities can be performed on that object.
  • JAVA test test P1JAVA test test P1
    java is an object-oriented and class-based programming language. to help you read more interesting knowledge about the java programming language, the network administrator will send you a very interesting multiple choice question on this topic. please try.
  • What is Python? Why choose Python?What is Python?  Why choose Python?
    python is a powerful, high-level, object-oriented programming language, created by guido van rossum. python is easy to learn and emerging as one of the best introductory programming languages ​​for people who are first exposed to programming languages.
  • What is C #What is C #
    c # is a simple, modern, general-purpose, object-oriented programming language developed by microsoft and approved by the european computer manufacturers association (ecma) and international standards organization (iso).