Skip to content
Computer ApplicationsICSE Class 10 · Chapter 2

Elementary Concept of Objects and Classes ICSE Class 10 Java

Updated 14 October 2026 · Fact-checked

An object is a real or software entity with state (attributes, stored in variables) and behaviour (methods). A class is the blueprint that describes such objects; it is also called an object factory and a user-defined data type. Objects are created with new, as in Student s = new Student(); and work by calling each other's methods (message passing).

What Elementary Concept of Objects and Classes is about

Java programs model the real world: a bank account, a student, a parcel. Each is an object with data and actions, and each kind of object is described once in a class. Every Section B program in the board paper starts by defining a class and creating an object of it, so this chapter is the foundation of the whole paper.

The syllabus asks for: modelling entities and their behaviour by objects; a class as a specification (blueprint) for objects and as an object factory; computation as message passing between objects (method calls); objects encapsulating state and behaviour; and a class as a user-defined data type. Board MCQs have asked about a picture of a polygon and shapes (class vs objects, 2024), the statement to create an object (2024) and what Game cricket = new Game(); means (2025).

Weightage: CISCE publishes no chapter weightage. Section A (40 marks) is compulsory: 1-mark MCQs and 2-mark short answers including output and error questions; in Section B you answer any four of six 15-mark programming questions written in Java.Source: CISCE ICSE Computer Applications (661) specimen paper structure for 2027

Key concepts

Objects: state and behaviour

An object is an identifiable entity that has a state and a behaviour.

State: the characteristics or attributes of the object at a moment, stored in variables (data members). A car's state: colour, speed, fuel level.
Behaviour: what the object can do, implemented as methods (member functions). A car's behaviour: accelerate(), brake(), turn().
Identity: each object is distinct, even if two have the same state.

In software, a student object might have state name, rollNo and marks, and behaviour input(), calculateGrade() and display(). The object encapsulates (holds together) its state and behaviour.

Worked example

(2 marks) Identify the state and behaviour of a 'mobile phone' object.

Try it first, then show the solutionSolution
  1. State (attributes): brand, battery level, volume - 1 mark.
  2. Behaviour (methods): call(), sendMessage(), charge() - 1 mark.

Answer: State: brand, model, battery level and volume. Behaviour: making a call, sending a message, charging and changing the volume.

Class as blueprint, object factory and user-defined type

A class is a template or blueprint that defines the variables (state) and methods (behaviour) common to all objects of one kind. It does not occupy memory for data until objects are created.

Class as an object factory: just as a factory produces many similar products from one design, a class can produce any number of objects, each with its own values. Example: from the class Car, objects car1 and car2 can be made with different colours.

Class as a user-defined data type: a programmer creates a new type, such as Student, and then declares variables of that type (Student s;), just as int and double are built-in types. It is called a composite (non-primitive) type because it combines several members.

An object is an instance of a class.

Worked example

(1 mark) In a picture showing the word 'Polygon' above a triangle, a square and a hexagon, which statement is correct?
(a) Polygon is an object; the shapes are classes
(b) Polygon is a class; the shapes are objects
(c) All are classes
(d) All are objects

Try it first, then show the solutionSolution
  1. Polygon is the general description (class); each shape is a particular instance (object).

Answer: (b) Polygon is a class; the shapes are objects.

Creating objects with new

Syntax: ClassName objectName = new ClassName();
Example: Student s1 = new Student();

Here Student (left) is the class (type) of the variable; s1 is the object (reference) name; new allocates memory for a new object; Student() calls the constructor to initialise it. Java is case sensitive, so the class name must match exactly: if the class is fruit, then fruit mango = new fruit(); is correct, while Fruit mango = new fruit(); is wrong.

If a constructor takes arguments, they are passed in the brackets: Robot sifra = new Robot(2.5, 3.0, 1.5);

Members are reached with the dot operator: s1.display(); s1.marks.

Worked example

(2 marks) Write a statement to create an object named sparrow of class Bird. Name the parts of the statement.

Try it first, then show the solutionSolution
  1. Bird sparrow = new Bird(); - 1 mark.
  2. Bird: class name; sparrow: object; new: allocates memory; Bird(): constructor call - 1 mark.

Answer: Bird sparrow = new Bird(); Here Bird is the class, sparrow is the object (reference) name, new allocates memory for the object and Bird() is the constructor that initialises it.

Message passing (method calls)

Objects interact by sending messages to one another. A message is a request to an object to perform one of its methods, possibly with data (arguments). In Java a message is a method call through the dot operator: account.deposit(500); asks the object account to run its deposit method with 500.

A message has three parts: the receiving object (account), the method name (deposit) and the arguments (500). Computation in an object oriented program is a sequence of such messages between objects.

Worked example

(2 marks) In the statement cart.addItem("Pen", 3); identify the object, the message and the arguments.

Try it first, then show the solutionSolution
  1. Object (receiver): cart - 1 mark.
  2. Message (method): addItem; arguments: "Pen" and 3 - 1 mark.

Answer: cart is the receiving object, addItem is the message (method called), and "Pen" and 3 are the arguments sent with it.

A class with two objects

Each object gets its own copy of the instance variables, so changing one object does not change another.

class Lamp
{
boolean isOn;
void switchOn()
{
isOn = true;
}
void show()
{
System.out.println("Lamp on: " + isOn);
}
public static void main(String args[])
{
Lamp a = new Lamp();
Lamp b = new Lamp();
a.switchOn();
a.show();
b.show();
}
}

Output:
Lamp on: true
Lamp on: false

b.isOn keeps its default value false because only a received the switchOn() message. (Instance variables of type boolean default to false, int to 0, double to 0.0, and objects such as String to null.)

Worked example

(2 marks) In the Lamp program, why does b.show() print false?

Try it first, then show the solutionSolution
  1. Each object has its own copy of isOn - 1 mark.
  2. Only a received switchOn(); b's isOn keeps its default value false - 1 mark.

Answer: Because a and b each have their own isOn variable; only a was sent switchOn(), so b's isOn still has its default value false.

Elementary Concept of Objects and Classes in real life

Each concept, met in an everyday situation. Read the situation, answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.

Class as an object factory

Suppose a biscuit factory uses one mould design to stamp out thousands of biscuits, some with chocolate and some with cream.

Relate this to classes and objects.

Try it first, then show the solutionSolution
  1. The mould design is like a class: it defines the shape and parts.
  2. Each biscuit is like an object made from it.
  3. Different fillings are like different values of the same attributes.

Answer: The mould is the class (blueprint, object factory) and each biscuit is an object (instance) with its own attribute values, such as filling.

Memory hook: One mould, many biscuits; one class, many objects.

State and behaviour

Imagine a ceiling fan with speed settings 0 to 5 and a regulator to change the speed or switch it off.

Write the fan's state and behaviour as a programmer would.

Try it first, then show the solutionSolution
  1. State: int speed; boolean isOn.
  2. Behaviour: increaseSpeed(), decreaseSpeed(), switchOff().
  3. The regulator sends messages that change the state.

Answer: State: speed and isOn (variables). Behaviour: increaseSpeed(), decreaseSpeed() and switchOff() (methods) that change the state.

Memory hook: Nouns become variables; verbs become methods.

Message passing

Suppose at a restaurant you tell the waiter 'Two dosas, please'; the waiter tells the kitchen, and the kitchen returns the food.

How does this resemble objects passing messages?

Try it first, then show the solutionSolution
  1. You (an object) send a message to the waiter object with arguments (dosa, 2).
  2. The waiter sends a message to the kitchen object.
  3. The kitchen performs its method and returns a result.

Answer: Each person is an object; requests are messages (method calls) with arguments, and the food is the returned result: computation as message passing.

Memory hook: Ask the object, and it acts.

Topics in this chapter

Elementary Concept of Objects and Classes: syntax and key facts

Object creation
ClassName objectName = new ClassName(arguments);
Case must match the class name exactly.
Calling a method (message)
objectName.methodName(arguments);
Dot operator reaches a member.
Object
Object = state (variables) + behaviour (methods) + identity
An object is an instance of a class.
Class
Class = blueprint = object factory = user-defined (composite) data type

How the board asks Elementary Concept of Objects and Classes

The question patterns to expect, and the method that works for each.

Question typeHow it is askedMethod
MCQ (Section A)Picture-based class vs object (2024); correct object creation statement (2024); meaning of Game cricket = new Game(); (2025).General idea = class; particular instance = object; check spelling and case in creation statements.
Short answer (2 marks)Write a statement to create an object; define class/object; identify state and behaviour.Use exact syntax with semicolon; name the parts.
Program (15 marks)Every Section B program defines a class with member variables and methods, and main creates an object and calls the methods.Use the class, variable and method names given; create the object in main and call each method.

Tricks to remember Elementary Concept of Objects and Classes

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Blueprint and house

    A class is the blueprint; objects are the houses built from it.

    Use it when: Class vs object.

  • Nouns and verbs

    Nouns (colour, speed) become variables; verbs (drive, stop) become methods.

    Use it when: Modelling an entity.

Elementary Concept of Objects and Classes: board-level solved questions

Ordered from board level to HOTS. Cover the solution, write your own, then compare step by step.

Example 1: Reading an object creation statement · 1 mark · MCQBoard level

Which is true for: Game cricket = new Game();
(a) Game is an object of class cricket
(b) new creates the class Game
(c) Game is a class and cricket is an object
(d) Game and cricket are both objects

Try it first, then show the solutionSolution
  1. Syntax: ClassName objectName = new ClassName();

Answer: (c) Game is a class and cricket is an object

Example 2: Correct creation statement · 1 mark · MCQHarder board level

The class is named vehicle. Which statement correctly creates an object car?
(a) Vehicle car = new vehicle();
(b) vehicle car = new vehicle();
(c) car vehicle = new car();
(d) vehicle car = new Car();

Try it first, then show the solutionSolution
  1. Java is case sensitive: both class names must be exactly vehicle.

Answer: (b) vehicle car = new vehicle();

Example 3: Assertion and reason: user-defined type · 1 mark · Assertion-reasonHarder board level

Assertion (A): A class is called a user-defined data type.
Reason (R): After defining a class, the programmer can declare variables (objects) of that class just like variables of built-in types.
(a) Both A and R are true and R is the correct explanation of A
(b) Both A and R are true but R is not the correct explanation of A
(c) A is true but R is false
(d) A is false but R is true

Try it first, then show the solutionSolution
  1. Both true; declaring variables of the new type is why it is a data type.

Answer: (a) Both A and R are true and R is the correct explanation of A

Example 4: Why 'object factory'? · 2 marks · Very short answerBoard level

Why is a class called an object factory?

Try it first, then show the solutionSolution
  1. A class can produce any number of objects.
  2. All share the same structure but have their own values.

Answer: Because, like a factory producing many similar products from one design, a class can be used to create any number of objects, all with the same variables and methods but each with its own values.

Example 5: Trace two objects · 2 marks · Short answerHarder board level

Give the output:
class Counter
{
int count;
void tick()
{
count++;
}
public static void main(String args[])
{
Counter p = new Counter();
Counter q = new Counter();
p.tick();
p.tick();
q.tick();
System.out.println(p.count + " " + q.count);
}
}

Try it first, then show the solutionSolution
  1. Each object has its own count, starting at 0.
  2. p.count becomes 2; q.count becomes 1; output joins them with a space.

Answer: 2 1

Example 6: Rectangle class (Section B) · 15 marks · Long answerBoard level

Define a class Rectangle with member variables length and breadth (double). Write methods: void input() to accept length and breadth using Scanner; double area() to return the area; double perimeter() to return the perimeter; void display() to print both. Write main() to create an object and call the methods.

Try it first, then show the solutionSolution
  1. import java.util.Scanner;
    class Rectangle
    {
    double length, breadth;
    void input()
    {
    Scanner sc = new Scanner(System.in);
    System.out.print("Enter length and breadth: ");
    length = sc.nextDouble();
    breadth = sc.nextDouble();
    }
  2. double area()
    {
    return length * breadth;
    }
    double perimeter()
    {
    return 2 * (length + breadth);
    }
  3. void display()
    {
    System.out.println("Area = " + area());
    System.out.println("Perimeter = " + perimeter());
    }
  4. public static void main(String args[])
    {
    Rectangle r = new Rectangle();
    r.input();
    r.display();
    }
    }
  5. Trace with input 5 3: area = 15.0, perimeter = 2 × 8.0 = 16.0.

Answer: Sample run:
Enter length and breadth: 5 3
Area = 15.0
Perimeter = 16.0

Example 7: Model an entity · 15 marks · Long answerHOTS / competency

Suppose you must model a 'BankAccount' for a school project. Define a class BankAccount with member variables accNo (long), holderName (String) and balance (double), and methods: void open(long a, String h, double b) to set the three members; void deposit(double amt); void withdraw(double amt), which prints 'Insufficient balance' if amt is more than the balance; and void showBalance(). In main(), open an account for Meera (number 1001, ₹500), deposit ₹1,000, try to withdraw ₹2,000 and then ₹300, and show the balance. In acc.deposit(1000.0), name the receiver, the message and the argument.

Try it first, then show the solutionSolution
  1. Attributes (state): accNo, holderName, balance. Behaviours: open(), deposit(), withdraw(), showBalance().
  2. class BankAccount
    {
    long accNo;
    String holderName;
    double balance;
    void open(long a, String h, double b)
    {
    accNo = a;
    holderName = h;
    balance = b;
    }
    void deposit(double amt)
    {
    balance = balance + amt;
    }
  3. void withdraw(double amt)
    {
    if (amt <= balance)
    balance = balance - amt;
    else
    System.out.println("Insufficient balance");
    }
    void showBalance()
    {
    System.out.println(holderName + " (" + accNo + "): " + balance);
    }
  4. public static void main(String args[])
    {
    BankAccount acc = new BankAccount();
    acc.open(1001, "Meera", 500.0);
    acc.deposit(1000.0);
    acc.withdraw(2000.0);
    acc.withdraw(300.0);
    acc.showBalance();
    }
    }
  5. Trace: 500 + 1000 = 1500; 2000 > 1500, so 'Insufficient balance'; 1500 − 300 = 1200.0. In acc.deposit(1000.0), acc is the receiver, deposit the message and 1000.0 the argument.

Answer: Output:
Insufficient balance
Meera (1001): 1200.0
In acc.deposit(1000.0): receiver acc, message deposit, argument 1000.0.

Case-study practice (Section B style)

Read the situation, then answer every part. In the board paper this is a 10-mark question split into 2 + 3 + 5 marks.

The school bus app

Imagine a programmer writing an app for school buses. She writes class Bus with variables busNo, route and seatsFree, and methods board(int n) and showSeats(). She creates bus7 and bus12 from the class, and when 5 students get on bus 7 the app runs bus7.board(5);.

  1. (i) · 2 marks

    Identify the class and the objects.

    Answer

    Answer: Class: Bus. Objects: bus7 and bus12.

    1 mark each.

  2. (ii) · 3 marks

    Identify the state and behaviour of a Bus object.

    Answer

    Answer: State: busNo, route, seatsFree. Behaviour: board(int n) and showSeats().

    State 2 marks; behaviour 1 mark.

  3. (iii) · 5 marks

    Write the statement that creates bus7, and explain why bus7.board(5) does not change bus12's seatsFree. Name the message, receiver and argument.

    Answer

    Answer: Bus bus7 = new Bus(); Each object has its own copy of instance variables, so changing bus7's seatsFree leaves bus12's unchanged. Message: board; receiver: bus7; argument: 5.

    Statement 2 marks; explanation 1 mark; parts 2 marks.

Where the marks are

How a typical answer is split into step marks. Show every step: a right final answer alone rarely earns full marks.

Write a statement to create an object of a given class. (2 marks) (2 marks)

StepMarks
Correct class name on both sides with matching case.1
Object name, new, brackets (with arguments if needed) and semicolon.1

Define a class with variables and methods, and main() creating an object (Rectangle). (15 marks) (15 marks)

StepMarks
Class header and member variables with correct types.2
Scanner import and object; input statements.3
area() and perimeter() with correct formulas and return.4
display() printing both values with labels.2
main(): object creation and method calls.3
Variable description / comments.1

Where students lose marks in Elementary Concept of Objects and Classes

The slips examiners see most often, and what to write instead.

  • Mistake: Confusing class and object in picture questions

    The 2024 examiners found the polygon picture question confusing for candidates.

    Do this: The general category is the class; each particular item is an object.

    Usually costs: 1 mark.

  • Mistake: Wrong case in object creation

    In 2024 candidates confused class name, object name and case.

    Do this: Copy the class name exactly on both sides: fruit mango = new fruit();

    Usually costs: 1 mark.

  • Mistake: Not creating an object or calling methods in main()

    The 2024 and 2025 examiners reported Section B answers without object creation and method calls.

    Do this: End every program with main() that creates the object and calls each method in order.

    Usually costs: 1 to 2 marks of 15.

  • Mistake: Omitting constructor arguments

    In 2025 candidates left out the arguments when creating a Robot object that needed three doubles.

    Do this: Pass the required values in the brackets after new ClassName.

    Usually costs: 1 mark of 2.

Practice questions on Elementary Concept of Objects and Classes

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    An object is an instance of a:
    (a) method
    (b) class
    (c) variable
    (d) package

    Hint

    Blueprint.

    Answer

    (b) class

  2. Q2 · 1 mark · MCQBoard level

    The behaviour of an object is defined by its:
    (a) variables
    (b) methods
    (c) packages
    (d) comments

    Hint

    Actions.

    Answer

    (b) methods

  3. Q3 · 1 mark · MCQBoard level

    Which keyword allocates memory for a new object?
    (a) class
    (b) new
    (c) void
    (d) static

    Hint

    Creation.

    Answer

    (b) new

  4. Q4 · 2 marks · Very short answerHarder board level

    Write a statement to create an object named sifra of class Robot whose constructor takes three double values 2.0, 1.5 and 0.5.

    Hint

    Arguments in the brackets.

    Answer

    Robot sifra = new Robot(2.0, 1.5, 0.5);

  5. Q5 · 2 marks · Very short answerBoard level

    Give two differences between a class and an object.

    Hint

    Blueprint vs instance.

    Answer

    (1) A class is a blueprint that describes variables and methods; an object is an instance created from it. (2) A class is a logical description that does not hold data values, whereas each object occupies memory and holds its own values.

  6. Q6 · 2 marks · Very short answerHarder board level

    Find the error and correct it:
    class Pen { int ink; }
    ...
    pen p = new Pen();

    Hint

    Case sensitivity.

    Answer

    The type name pen does not match the class Pen (Java is case sensitive). Correct: Pen p = new Pen();

  7. Q7 · 2 marks · Short answerHOTS / competency

    Give the output:
    class Box
    {
    int size = 2;
    public static void main(String args[])
    {
    Box x = new Box();
    Box y = new Box();
    x.size = x.size * 5;
    y.size = y.size + x.size;
    System.out.println(x.size);
    System.out.println(y.size);
    }
    }

    Hint

    Separate copies.

    Answer

    10
    12

  8. Q8 · 15 marks · Long answerHarder board level

    Define a class Student with variables name (String) and marks (int). Write input() to accept them with Scanner, and display() to print the name and 'Pass' if marks are 40 or more, otherwise 'Fail'. Write main() to create an object and call both methods.

    Hint

    Use nextLine() for the name.

    Answer

    import java.util.Scanner;
    class Student
    {
    String name;
    int marks;
    void input()
    {
    Scanner sc = new Scanner(System.in);
    System.out.print("Name: ");
    name = sc.nextLine();
    System.out.print("Marks: ");
    marks = sc.nextInt();
    }
    void display()
    {
    System.out.println("Name: " + name);
    if (marks >= 40)
    System.out.println("Pass");
    else
    System.out.println("Fail");
    }
    public static void main(String args[])
    {
    Student s = new Student();
    s.input();
    s.display();
    }
    }
    Sample run with Asha and 72 prints Name: Asha and then Pass.

  9. Q9 · 2 marks · Short answerHOTS / competency

    Why is a class called a composite data type?

    Hint

    Made of many.

    Answer

    Because it is built by combining several members of different types (for example a String name, an int roll number and methods) into one unit, unlike a primitive type that holds a single value.

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.What is an object?Show answer

    An entity with state, behaviour and identity; an instance of a class.

  2. 2.What defines an object's state?Show answer

    Its variables (attributes).

  3. 3.Which operator calls a method of an object?Show answer

    The dot (.) operator.

  4. 4.Default value of an int instance variable?Show answer

    0

  5. 5.Why is a class a user-defined data type?Show answer

    Variables (objects) of that class can be declared like built-in types.

Best order to study it

  1. Objects: state, behaviour, identity with examples.
  2. Class as blueprint, object factory, user-defined type.
  3. Object creation syntax and the dot operator.
  4. Message passing.
  5. Write one full class with main() creating an object.

Quick revision checklist

The night before the exam: can you do each of these without looking?

  • Object = state (variables) + behaviour (methods).
  • Class = blueprint, object factory, user-defined composite type.
  • ClassName obj = new ClassName(args);
  • obj.method(args) = sending a message.
  • Each object has its own copy of instance variables.

Elementary Concept of Objects and Classes: frequently asked questions

Does a class occupy memory?

Memory for instance variables is allocated only when an object is created with new; the class itself is a description.

Can one class have many objects?

Yes, any number, each with its own values.

Do I need a variable description table?

It is good practice for Section B programs and is part of school assessment; comments explaining variables also help the examiner.

Based on: CISCE ICSE 2027 Computer Applications syllabus; CISCE Analysis of Pupil Performance ICSE 2025: Computer Applications (with the 2025 board paper)