OOP's Class

Class is a template to create objects.

The class consists of attributes and operations.

Class Declation 

class className{

}

Object Creation

className objectName = new className();

ex: rectangle smallarea = new rectangle();


Operation / Method

No return - void

        void area(){

        .......

        }

return - int / string etc.

        int area(){

        .......

    return 0;

        }

Comments

Popular posts from this blog

TensorFlow Train/test /evaluation flow

AttributeError : module 'tensorflow' has no attribute 'global_variables_initializer'

AttributeError: module 'tensorflow_estimator.python.estimator.api._v2.estimator' has no attribute 'inputs'