MIS Annual Examination 2023-2024: Computer Applications (Theory)
MIS Annual Examination 2023-2024: Computer Applications (Theory)
COMPUTER APPLICATIONS
(Theory)
(Two hours)
The time given at the head of this Paper is the time allowed for writing the answers.
Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets [ ].
Question 1
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only.)
(i) Name the feature of java which enables wrapping up of data and function into single unit:
(a) Encapsulation
(b) Inheritance
(c) Abstraction
(d) Polymorphism
(a) relational
(b) logical
(c) arithmetic
(d) assignment
(a) 20 bytes
(b) 60 bytes
(c) 40 bytes
(v) The method of Scanner class used to accept a double value is:
(a) nextInt()
(b) nextDouble()
(c) next()
(d) nextInteger()
(a) every
(b) all
(c) case
(d) each
(a) 9.0
(b) 11.0
(c) 10.0
(d) 11
System.out.print("HELLO")
(a) logical
(b) no error
(c) runtime
(d) syntax
(ix) Name the package that contains wrapper classes:
(a) java.lang
(b) java.util
(d) java.awt
1. 4
2. 4.0
3. 4.3f
4. “four”
(a) Only 1.
(b) 1. and 3.
(c) 2. and 4.
(d) 1. and 2.
Question 2
x = x ++ + ++ x + x
(iii) The following code segment should print “You can go out” if you have done
your homework (dh) and cleaned your room(cr). However, the code has errors.
boolean dh = True;
else
(iv) How many times will the following loop execute? What value will be returned?
int x=2;
int y=50;
do{
++x;
y-=x++;
while(x<=10);
return y;
x * = - - x + x++ + x
int x=10;
do
{x– –;
System.out.print(x);
}while (x>=1);
int m= 400;
while(n>0)
{d=n%10;
System.out.println(d);
n=n/100;
(b) The method which has same name as that of the class name.
SECTION B
The answers in this section should consist of the programs in either BlueJ environment or any
Each program should be written using variable description / mnemonic codes so that the logic of the
Question 3
Member variables:
Member methods:
void accept(): Accept the name and the price of the item using the methods of Scanner class.
void calculate(): To calculate the net amount to be paid by a customer, based on the following criteria:
Price Discount
void display(): To display the name of the item and the net amount to be paid.
Write the main method to create an object and call the above methods.
Question 4
Define a class to accept a 3 digit number and check whether it is a duck number or not.
Example1:
Input: 2083
Output: Invalid
Example 2:
Input: 103
Question 5
Member variables:
Member methods:
void accept() – Accept name, age and marks using methods of Scanner class.
mks Stream
void print() – Display student name, age, mks and stream allocated.
Question 6
Using the switch statement, write a menu driven program to perform following
operations:
(i) To Print the value of Z where Z =(x 3+3x)/Y where x ranges from – 10 to 10 with
23
456
7 8 9 10
11 12 13 14 15
Question 7
Write a menu driven program to find the sum of the following series depending on the
user choosing 1 or 2
1. S=1/4+1/8+1/12.........upto n terms
2. S=1/1!-2/2!+3/3!.......upto n terms
where ! stands for factorial of the number and the factorial value of a number is the
(use switch-case).
Question 8
Write a program to calculate the sum of all the prime numbers between the range of
1 and 100.