Revision Tour I Solutions ICSE Class 10 Computer Applications

ICSE Solutions for Class 10

Get ICSE Revision Tour I solutions for class 10. It will help you to make good preparation before attending the ICSE Board exam. We have provided you with the Revision Tour I solutions class 10 to score good marks in your exam.

In ICSE Class 10, Revision Tour I solutions is compulsory to score good marks in computer application. Students Who are planning to score higher marks in class 10 should practice ICSE Revision Tour I solutions class 10.

ICSE Revision Tour I Solutions Class 10 Computer Applications

Tick (✓) the correct option.

Question. Name the programming technique that implements programs as an organised collection of interactive objects.
a. Procedure Oriented Programming
b. Modular Programming
c. Object Oriented Programming
d. None of these

Answer

C

Question. Name the characteristics of Object Oriented Programming that hides the complexity and provides a simple interface.
a. Encapsulation
b. Polymorphism
c. Abstraction
d. Inheritance

Answer

C

Question. Which among the following operator is used to access individual members of an object?
a. . (dot)
b. + (plus)
c. – (minus)
d. / (divide)

Answer

A

Question. Which among the following modifier is used in a ‘class’?
a. public
b. default
c. Both a and b
d. None of these

Answer

C

Question. Which among the following is a valid class name?
a. Simple Interest
b. SimpleInterest
c. 1SimpleInterest
d. Simple@Interest

Answer

B

Question. Which among the following is a valid object name?
a. obj1
b. 1obj
c. Obj 1
d. Obj#1

Answer

A

State whether the following statements are True (T) or False (F).

Question. Encapsulation refers to the art of hiding the complexities and giving a simple interface.

Answer

False

Question. Procedure Oriented Language follows top down approach.

Answer

True

Question. Java is an example of Object Oriented Language.

Answer

True

Question. Hiding the complexity and giving a simple interface is called Inheritance.

Answer

False

Question. Abstraction is same as encapsulation.

Answer

False

Question. An object is called a class factory.

Answer

False

Question. A class is an instance of an object.

Answer

False

Question. A class is a mechanism to implement encapsulation.

Answer

True

Question. Data members in a class is used to represent the characteristic of an object.

Answer

True

Question. The new operator is used to create an object.

Answer

True

Question. It’s a rule to have a class-name beginning in capital letter.

Answer

False

Fill in the blanks.

Question. A  ______________ is a template that binds together data and methods together.

Answer

class

Question. The values in the attributes of an object is called the  ______________ of an object.

Answer

state

Question. The ______________ operator is used to access the individual members of a class.

Answer

dot

Question. The keyword  ______________ is used to allocate memory space for an object.

Answer

new

Question. The default and  ______________ access modifier is used with a class.

Answer

public

Question. An object is an identity with certain  ______________ and  ______________

Answer

characteristic, behaviour.

Question. The values/attributes of the characteristics of an object are called the  ______________ of an object.

Answer

state

Question. All the complexities of a program should be  ______________  in such a way so that  ______________  is obtained.

Answer

encapsulated, abstraction

Question.  ______________ allows us to encompass the parent class’ state and behaviours into its child..

Answer

Inheritance

Question. Poly-means ______________ and Morphism means ______________.

Answer

many, forms

Answer the following questions:

Question. How are objects implemented in software?
Answer. In a software the characteristics of an object are represented through data members and behaviour is represented through member functions.

Question. What is abstraction? How is encapsulation related to it?
Answer. Abstraction is a principle of Object Oriented Programming (OOP) that hide certain details and only show the essential features of the object.

Question. What is Object Oriented Programming?
Answer. Object Oriented Programming (or OOP) is a technique of implementing programs which are organized as a co-interactive collection of objects, each of which represents an instance of a class.

Question. What is Inheritance?
Answer. Inheritance is the concept that when a class of objects is defined, any subclass that is defined can inherit the definitions of one or more general classes.

Question. Define Encapsulation.
Answer. Encapsulation is a principle of Object Oriented Programming (OOP) that binds together characteristics and behaviour of an object into a single unit represented by a class.

Question. State three differences between Procedure Oriented Language and Object Oriented Languages.
Answer.

Procedure Oriented ProgrammingObject Oriented Programming
A large program is divided into smaller segments or procedures.A program is represented as an object.
More importance is given to the program rather than the data.More importance is given to the data rather
than the program.
It follows top down approach.It follows bottom up approach.

Question. What is a literal?
Answer. Literal is a constant value that can be assigned to a variable.

Question. What are identifiers?
Answer. Identifiers are the names of variables, methods, classes, packages and interfaces.

Question. Why is an object called an instance of a class?
Answer. An object is called an instance of a class as every object created from a class gets its own instances of the variables defined in the class. Multiple objects can be created from the same class.

Question. State the four characteristics/principles of Object Oriented Programming.
Answer. Encapsulation, Abstraction, Polymorphism and Inheritance.

Question. What are keywords? Give an example.
Answer. A keyword is a reserved word that has a special significance to the compiler and cannot be used anywhere else other than what it is intended for. Example- for, if, else, while etc.

Question. Write one difference between primitive data type and composite data type.
Answer.

Fundamental data typeComposite data type
These are inbuilt data type provided by the
Java Language.
These are data types created by the user using fundamental or user defined data type or both.
The size of it is fixed.The size of different user-defined data type depends upon the size of the individual components of it.
These data types are available in all parts of a program within a class.These data types are available only as specified by the access specifiers.

Question. Give one example each of primitive data type and composite data type.
Answer. Primitive data type: int, short, boolean, char etc. Composite data type: class, arrays, interface etc.

Question. State two differences between a class and an object.
Answer.

ObjectClass
Object is an instance of a class.Class is a blueprint or template from which
objects are created.
Object is a real world entity such as pen, laptop, mobile, bed, keyboard, mouse, chair etc.Class is a group of similar objects.
Object is a physical entity.Class is a logical entity.
Object is created through new keyword mainly e.g. Student s1 = new Student();Class is declared using class keyword e.g. class Student{}
Object is created many times as per requirement.Class is declared once.
Object allocates memory when it is created.Class doesn’t allocated memory when it is created.

Question. Give one point of difference between unary and binary operators.
Answer. Unary operator works on a single operand and Binary operator works on 2 operands.

Question. State the Java concept that is implemented through:
i. A super class and a sub-class.
ii. The act of representing essential features without including background details.
Answer. i. Inheritance
ii. Abstraction

Question. State the difference between a Boolean literal and a character literal.
Answer. A boolean literal consist of only two values i.e. true or false. A character literal on the other hand is any character enclosed within single quotes.

Question. Identify the literals as given below: i. 0.5 ii. ‘A’ iii. false iv. “a”
Answer. i. double ii. char iii. boolean iv. String

Question. What do you understand by type conversion?
Answer. Type conversion is the process of converting one Primitive data type to another primitive data type. It may be done either implicitly or explicitly.

Question. State the difference between an accumulator and counter.
Answer. Accumulator is a variable that is used to add or accumulate a list of items. Counter on the other hand is a variable, which is used to keep track of the number of times an operation is being performed.

Question. What does a class encapsulate?
Answer. A class encapsulates characteristics represented by data member and behaviour represented by member methods.

Question. Which two access specifier is used in a class declaration?
Answer. public and default

Question. What is meant by precedence of operators?
Answer. When several operations occur in an expression, each part is evaluated and resolved in a predetermined order called operator precedence.

Question. What is Operator Associativity?
Answer. Operator associativity of an operator is a property that determines how operators of the same precedence are grouped in the absence of parentheses; i.e. in what order each operator is evaluated when two operators of same precedence appear in an expression.

Question. Why is a class called an object factory?
Answer. A class is called an object factory because objects are created from a class. An object is an instance of a class.

Question. Evaluate the value of n if the value of p=5 and q=19: int n = (q-p)>(p-q)?(q-p):(p-q);
Answer. n=14

Question. Write a statement in Java that will declare an object named si of the Simple Interest class.
Answer. Simple Interest si = new Simple Interest();

Question. Rewrite the following program after removing the errors, underlining each correction: class My Class
{
         int a, b;
         void initialize( )
        {       
        a=5;
        b=6;
       }
       void show ( )
       {
       System. out. printing (a+ ‘’ ‘’ + b);
       }
       static void main( )
       {
       My Class ob = new My Class ( );
       ob. initialize ( );
       show ( ). ob;
       }

}
Answer. class My Class
{
               int a, b;
               void initialize( )
               {
               a=5;
               b=6;
               }
void show ( )
{
               System.out.println (a+ ‘’ ‘’ + b);
}
static void main( )
               {
               MyClass ob = new MyClass( );
               ob. initialize( );
               ob.show ( );
               }
}

Question. Which among the following are invalid class names in Java? State with reasons.
i. Compound Interest ii. 1MyClass iii. MyClass$ iv. Myclass# v. My@Class
Answer. i. Invalid, as a variable name cannot have a blank space.
ii. Invalid, as a variable name cannot begin with a digit.
iv. Invalid, as a variable name cannot have a special character, like #.
v. Invalid, as a variable name cannot have a special character, like @.

Question. What is the resultant data type of the following mathematical expression?
a+b*c-d
a. where a is int, b is int, c is float and d is float type
b. where a is float, b is long, c and d is of int type
c. where a is of double and b,c and d are of int type
d. where a is char and b,c and d are of int type
e. where a, b, c and d are of int type, however the expression is slightly modified as (a+b*c-d)/7.0
Answer. a. float
b. float
c. double
d int
e. double

Question. What will be the output when the following code segment is executed?
System.out.println(“The king said \”Begin at the beginning!\ “to me”);
Answer. The king said “Begin at the beginning!” to me

Question. System.out.print(“BEST “);
System.out.println(“OF LUCK”);
Choose the correct option for the output of the above statements:
i. Best of luck
ii. BEST
OF LUCK
Answer. i. Best of luck

Question. What is the value of y after evaluating the expression given below?
y+=++y + y– + –y; when int y=8
Answer. y=33

1. Write a program to find the sum and difference between 25 and 16 using variables in different lines.
Answer. class q1
{
              static void main()
              {
              int a=25,b=16,s,d;
              s=a+b;
              d=a-b;
              System.out.println(“Sum=”+s);
              System.out.println(“Difference=”+d);
              }
}

Question. Write a program to find the product of 5, 7 and 12 using variables.
Answer. class q2
{
              static void main()
{
              int a=5,b=7,c=12,d;
              d=a*b*c;
              System.out.println(“Product=”+d);
              }
}

Question. Write a program to find the product of the sum and difference between 17 and 2 using variables.
Answer. class q3
{
              static void main()
              {
              int a=17,b=2,s,d;
              s=a+b;
              d=a-b;
              System.out.println(“Sum=”+s);
              System.out.println(“Difference=”+d);
              }
}

Question. Write a program to average of 36, 45 and 53 using variables of adequate data type.
Answer. class q4
{
              static void main()
              {
              int a=36,b=45,c=53;
              float av;
              av=(float)(a+b+c)/3;
              System.out.println(“Average=”+av);
              }
}

Question. Write a program using int variables to find the sum of three numbers say 15, 36 and 45 and subtract the result from 100 using variables.
Answer. class q5
{
              static void main()
              {
                     int a=15,b=36,c=45,d=100,e;
                     e=d-(a+b+c);
                     System.out.println(“Answer=”+e);
              }
}

Question. Write a program to display the names of five fruits with a single System.out.println(); statement, but in different lines.
Answer. class q6
{
              static void main()
              {
              System.out.println(“Apple\nOrange\nGuava\nBanana\nLemon”);
              }
}

Question. Write a program to find the sum, difference and product of 12.35 and 7.3 using variables with a single System.out.println(); statement, however with horizontal tab space in the result.
Answer. class q7
{
              static void main()
              {
              float a=12.35f,b=7.3f,s,d,p;
              s=a+b;
              d=a-b;
              p=a*b;
              System.out.println(“Sum=”+s);
              System.out.println(“Difference=”+d);
              System.out.println(“Product=”+p);
              }
}

Question. Write a program using float type variables to find the area and perimeter of a square whose side is 12.5 cm.
Answer. class q8
{
              static void main()
              {
              float s=12.5f,a,p;
              a=s*s;
              p=4*s;
              System.out.println(“Area=”+a);
              System.out.println(“Perimeter=”+p);
              }
}

Question. Write a program using int variables to find the area and perimeter of a rectangle of length 12cm and breadth 8cm.
Answer. class q9
{
      static void main()
     {
     int l=12,b=8,a,p;
     a=l*b;
     p=2*(l+b);
     System.out.println(“Area=”+a);
     System.out.println(“Perimeter=”+p);
     }
}

Question. Write a program using variables to find the profit and profit percent of a certain transaction where S.P.= `10000 and C.P.= ` 7000.
Answer. class q10
{
     static void main()
     {
     float sp=10000,cp=7000,p,pp;
     p=sp-cp;
     pp=p/cp*100;
     System.out.println(“Profit=”+p);
     System.out.println(“Profit Percent=”+pp);
     }
}

Question. Write a program to input the Principal, Rate and Time and calculate the Simple Interest.

Answer. import java.util.*;
class q11
{
     static void main()
     {
     Scanner sc=new Scanner(System.in);
     float p,r,t,si;
     System.out.println(“Enter the principal, rate and time:”);
     p=sc.nextFloat();
     r=sc.nextFloat();
     t=sc.nextFloat();
     si=(p*r*t)/100;
     System.out.println(“Simple Interest=”+si);
     }
}

Question. Write a program using variables to find the area and circumference of a circle whose radius is 12cm.
Note that :
Area of a circle= π r2
Circumference of a circle = 2 π r
where r is the radius of the circle and π is 3.142.
Answer. class q12
{
     static void main()
     {
     float r=12,a,pie=3.142f,c;
     a=pie*r*r;
     c=2*pie*r;
     System.out.println(“Area=”+a);
     System.out.println(“Circumference=”+c);
     }
}

Question. Write a program to initialise two integer variables a and with 5 and 6 respectively and interchange them. Thus after interchanging, a and b will be 6 and 5 respectively.
Answer. class q13
{
     static void main()
     {
     int a=5,b=6,c;
     System.out.println(“Before Interchange: a=”+a+“b=”+b);
     c=a;
     a=b;
     b=c;
     System.out.println(“After Interchange: a=”+a+“b=”+b);
     }
}

Question. Write a program to initialise three int variables a, b and c with 234, 456 and 712 and store the sum of the last digits of the variables into d and display it.
Answer. class q14
{
     static void main()
     {
     int a=234,b=456,c=712,d;
     d=a%10+b%10+c%10;
     System.out.println(“Sum=”+d);
     }
}

Question. Write a program to initialise an int variable a with 76498 and from it extract the first digit and store it into a variable f and extract the last digit into a variable l and display both these digits.
Answer. class q15
{
     static void main()
     {
     int a=76498,f,l;
     f=a/10000;
     l=a%10;
     System.out.println(“First Digit=”+f);
     System.out.println(“Last Digit=”+l);
     }
}

Question. Write a program using ternary operator to check whether 27 is a multiple of 3 or not.
Answer. class q16
{
     static void main()
     {
     System.out.println((27%3==0)?“Multiple of 3”:“Not a multiple of 3”);
     }
}