--%>

Define Accessor method

Accessor method: A technique specifically designed to offer access to a private attribute of a class. By convention, we name accessors with a get prefix followed by the name of the attribute being accessed. For example, the accessor for an attribute named speed would be ‘getSpeed’. By creating an attribute private, we save objects of other classes from varying its value other than via a mutator method. The Accessors are employed both to grant safe access to the value of a private attribute and to save attributes from inspection by the objects of other classes. The later goal is attained by selecting a suitable visibility for the accessor.

   Related Questions in Programming Languages

  • Q : Explain Inheritance hierarchy

    Inheritance hierarchy: The relationship among super-classes and sub-classes is termed as an inheritance hierarchy. The single inheritance of classes means that each and every class has simply a single `parent' class and that Object class is the eventu

  • Q : ID of TC Trustcenter Publisher and

    For how long are ID of TC Trustcenter Publisher and certificates of developer valid?

  • Q : Program for Linux operating system that

    Write a program for Linux operating system that uses Posix threads to sort a large array.  Specifically, you should write a program to generate random numbers. Then create at least two threads, each of which sorts a portion of the array. After the thr

  • Q : Explain If statement If statement : A

    If statement: A control structure employed to select between performing or not performing additional actions.     if(boolean-expression){        // Statements

  • Q : Explain Assignment operator Assignment

    Assignment operator: The operator (=) employed to store the value of an expression into the variable, for example: Variable = expression; The right-hand

  • Q : Define the reasons of Process Handle

    Define the reasons of Process Handle Table.

  • Q : Different compatibility types when

    What are the different compatibility types when creating a COM COMPONENT?

  • Q : Define the term Runtime error Define

    Define the term Runtime error: It is an error which causes a program to finish whenever it is being run.

  • Q : Choice of technology in coding of game

    What are the choice of technologies while coding a game?

  • Q : What is SLAM SLAM is a Microsoft

    SLAM is a Microsoft project that blurs the line between static analysis and model checking and deductive reasoning. The main goal of SLAM is to check temporal safety properties of C programs (it actually checks that a program correctly uses the interf