Saturday, March 10, 2018

Java for Selenium - Mindmap Object, Classes and Inheritance

In the above example. We create a class bicycle which is defined by it's state and behavior.
members and methods are defined in the class. We can defined multiple objects of the class using class methods and members. 

Bicycle itself belongs to two wheeler class. Similarly there can be other class for motor bike which can have its own member and methods defined. 

Both bicycle and two wheeler can have specific methods and members defined in the class. 

Bicycle extends two wheeler which in turn extends vehicle, bicycle can use members and methods defined in two wheeler as well as vehicle class.

Class Declaration

class Bicycle extends TwoWheeler {
    // field, method and constructordeclarations
}

class TwoWheeler extends Vehicle {
    // field, method and constructordeclarations
}


Variables in a class:

Fields - Member variables in class
Local variable - defined inside method or block of scope
Parameters - variables in method declaration

Variable declaration : [Modifier] Type variablename

3 comments:

  1. Appreciable! The training is conducted by subject specialist corporate professionals with wide experience in managing real-time ethical hacking training / cyber security projects. Indian Cyber Army implements a blend of academic learning and practical sessions to give the candidate optimum exposure.

    ReplyDelete
  2. I just stumbled over this page and have to say - wow. The site is really good and kept up to date. Continue like
    Rajasthan University BCOM TimeTable 2020

    ReplyDelete
  3. Nicely explaned thanks for sharing..keep posting such a amazing post.
    MOVIES4YOU
    Dil Bechara Full movie Donload

    ReplyDelete