Computer Application
Computer Application
IASSX
anuary, 2023 .OMPUTEK APPLICATION
Mazimum Marks: 10
Time Allowed: Tnu Hours
Anner y this Paper must be vritten on tne puper pry viiei epuruttiy
u vill nat he ulloved ta write during
thefir:: 5 minute
This tirns is to te npent in reading the questitn paper.
n e liie
2iven ut the head ef this Paper is the time ullowed fur uriting the er;er
(vi) The wrapping up of data and nsthods together as one unit is called:
(a) Inheritance (b) Polymorphism c) Encapsulation (d) None of the above
"State" is -
c o n s t r u c t o r
ofa class Question.
detault
invoke
the State()
to obj-
The
statement
(b) State State (10, 5)
(x) State
(d) State obj-new (i)W
obj=new
(a) State State()
State
obj=new initialisation? i)
(c) character
Character("c");
is valid c=new
among
the following
b)
Character (ii)
Which
(xi)
c=new
Character('c);
(d)
None ofthese
Character
(a) Wrapper class calleao
and b corresponding
P=p*g
return ps
double a -6.52;
double b -14.74;
int c (int) Math.round(Math.max(a,b);
(xvii) The output of the method "Computer Application". substring (2,8) is:
for
iv)Write the Java expression
. Name the variable(s) for which euch objoct of the class will huve its OWII distinet tuuy
b. Name the variable(s) that are common to all the objocts of the clams.
d d*2;
System.out.println(d9:
whilei= 5);
(vii) What will the value ofx be atter execution ifx -
8 initially?
x+x+++x+ ++x ---x +X-- + 10
(vii) Write the values stored in the variables for the following juva segments:
a. String s= "Application".substring(7,11):
b. int indx = "Coconut".indexOt"o");
c. String e-"Tomputer".charA(0)+"Application".chatAt(0):
d. Boolean b = "Upper".isUpperCase();
System.out.println(s);
cc+1;
Qúestion 3 [15
Define a class taximeter having the following description:
Data members/instance variables:
int taxino - to store taxi number
String name -
Member functions:
b to 0.
taximeter()-constructor to initialize taxino to 0, name to"" and
input() - to accept taxino,name,km
calculate()- to calculate bill for a customer according to given conditions
Create an object in the main method and call all the above methods in it.
Question 4
[15
Write a program to accept a sentence and print only the first letter of each word of the sentence in
capital letters.
Question 5
Write a program to print the largest and smallest element ofan array storing 10 integers entered byy
the user.
Question 6
[15]
Write a menu driven program to perform the following operations:
) To input a number and print if it is a palindrome number or not.
(i) To input a mumber and print the product of first and last digit of the number
Question 7
[15
Design a class to overload a function SumSeries() as follows:
()void SumSeries (int n, double x) - with one integer argument and one double argument to find
and display the sum of the given series:
n terms