Introduction to Objects and Classes

Sumit Rawal answered on May 17, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • object of a class
  • Class And Objects
  • objects and classes
  • Benefits of objects and classes#

  • Introduction to Objects and Classes

    0

    A brief encounter

    We see objects everywhere in our surroundings. These objects have certain properties that define them. There are certain behaviors that these objects perform on their own, and there are actions that can be performed on them.

    Let’s take the example of a company employee. An employee has the following properties or attributes:

    ID

    Salary

    Department

    The following actions or behaviors can be performed on an employee:

    Calculation of tax on salary

    Calculation of salary per day

    In a company, each worker has a different name, salary, and department, but the type of each worker is employee. So, there is a generic blueprint for each worker working in the company, but each of them has different attributes.

    A class has a singular blueprint, and objects are part of a class and are differentiated by their distinct properties. 

    Popularity 1/10 Helpfulness 1/10 Language typescript
    Source: Grepper
    Tags: typescript
    Link to this answer
    Share Copy Link
    Contributed on May 17 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.