ICSE Mind Maps & On Tips Notes Class 10 - Computer Applications
ICSE Mind Maps & On Tips Notes Class 10 - Computer Applications
NOTES
Note making is a skill that we use in many walks of life : at school, university and in the world of
work. However, accurate note making requires a thorough understanding of concepts. We, at Oswaal,
have tried to encapsulate all the chapters from the given syllabus into the following ON TIPS NOTES.
These notes will not only facilitate better understanding of concepts, but will also ensure that each
and every concept is taken up and every chapter is covered in totality. So go ahead and use these
to your advantage... go get the OSWAAL ADVANTAGE!!
Software objects also have state and behaviour. Their state is maintained by variables and behaviour is
implemented through methods.
In an object,
l There are variables to hold data called member variables or attributes.
l The values of these member variables define the state of an object.
l There are member methods / operations / messages that define the behaviour of objects.
Once a class is declared, the variables of this class type (objects) can be declared and created. So, class
can be considered as an object factory.
Class provides a blueprint for objects. From this blueprint, objects are created using the new operator.
The keyword this refers to a current object which is created and initialised automatically by Java.
CHAPTER 4: Constructors
A constructor is a special type of method of a class which is used to initialize a newly created instance
of the class, eg- object.
Java constructor is invoked at the time of object creation. It constructs the values i.e. provides data for
the object. That is why, it is known as constructor.
The two rules to defined a constructor are:-
l Constructor name must be same as its class name.
l Constructor must have no explicit return type.
Characteristics of Java Constructors
l Constructors name must be exactly same as that of its class name.
l Constructors are called automatically when an object is created.
l Constructors cannot be private.
l A constructor can be overloaded.
l Constructors cannot return a value.
l Constructors do not have a return type (not even void).
l Constructors are not members of the class. Thus, they cannot be inherited.
The main use of Constructors is to initialise the object of that class type with a legal initial value.
Types of Java Constructors: There are following types of constructors:-
l Default constructor (no-argument constructor)
l Parameterised constructor
The parameterised constructors are used to initialise fields of the class with some specific values.
In Constructor overloading, the number of parameters can be same but it can also have different data types.
Compiler differentiates constructors on the basis of number of parameters, types of parameters and
order of parameters.
qqq