2008 ANNA UNIVERSITY CHENNAI M.C.A COMPUTER COMPUTER APPLICATION QUESTION PAPER

2008 COMPUTER APPLICATIONS University Question paper
COMPUTER APPLICATIONS
Target 2008 Examination
ICSE (Theory)

(Two Hours)


Answers to this paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.

This time is to be spent in reading the question paper.

The time given at the head of this paper is the time allowed for writing the answers.

This paper is divided into two Sections.

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 [ ].

SECTION A (40 Marks) Attempt all questions.

Question 1

(a). Name any two types of Java Data Types.

(b). Define an Identifier. Give an example of the same.

(c). Differentiate between Binary Search and Linear Search.

(d). Assign the value of temp = 98.4 to a variable with requisite data type.

(e). Explain with an example the SWITCH construct.

Question 2

(a). Differentiate between PUBLIC and PRIVATE visibility label.

(b). Why do we need a constructor as a class member?

(c). Explain the term type casting.

(d). Name the following:

(i). A package that is invoked by default.

(ii). A key word to use the classes defined in a package.

(e). Name the class that is used for different mathematical functions. Give an example of a mathematical function. [10]

Question 3

(a). State the difference between != and = =. [2]

(b). Write an equivalent Java syntax for the following expression:- a = 0.05 - 2 y3 [2]

(c). Rewrite the following using DO WHILE:

if (income <= 1000)tax = 0;elsetax = 12; [2](d). Write a statement for each of the following:(i). Store a number 800 as a String.(ii). Convert the string to a numeric value.(iii). Add it to the existing total of 1000 to update the SUM. [3](e). (i). What is the role of the keyword void in declaring functions?(ii). If a function contains several return statements, how many of them will be executed?(iii). Which OOP principle implements DATA HIDING? [3](f). What is the output of the following:-(i). System.out.println(“FIVE:” + 5 + 2);System.out.println(“SIX:” + (5 + 2)); [2](ii). String S1 = “Hi”;String S2 = “Hi”;String S3 = “there”;String S4 = “HI”;System.out.println(S1 + “equals” + S2 + “-->” + S1.equals(S2));
System.out.println(S1 + “equals” + S3 + “-->” + S1.equals(S3));
System.out.println(S1 + “equals” + S4 + “-->” + S1.equals(S4));
System.out.println(S1 + “EqualIgnoreCase” + S4 + “-->” + S1.EqualIgnoreCase(S4)); [4]

(g). Evaluate the following expressions, if the values of the variables are a = 1, b = 3 and c = 4.

(i). a- (b++) * (c++)

(ii). a * (++b) %c [2]


SECTION B (60 Marks) Attempt any four questions from this section.

The answers in this Section should consist of the Programs in either BlueJ environment
or any program environment with Java as the base. Each program should be written
using Variable descriptions/ Mnemonic Codes such that the logic of the program is
clearly depicted. Flow-Charts and Algorithms are not required.

Question 4

Define a class salary described as below:-

Data Members:
Name, Address, Phone, Subject Specialization, Monthly Salary, Income Tax.

Member Methods: (i). To accept the details of a teacher including the monthly salary.
(ii). To display the details of the teacher.
(iii). To compute the annual Income Tax as 5% of the annual salary above Rs. 1,75,000/-.

Write a main method to create object of a class and call the above member method. [15]

Question 5

Write a program to compute and display the sum of the following series:-

1! + 2 ! + 3 ! + 4! + ………….N ! [15]
BUY : Computer Application for ICSE: by S.Chand & Co. for SOLUTIONS
Or contact author at attention@computerscienceexpertise.com

Question 6

Write a program to initialize the given data in an array and find the minimum and maximum values along with the sum of the given elements.

Numbers: 2 5 4 1 3

Output: Minimum Value: 1
Maximum Value: 5
Sum of the elements: 15 [15]

Question 7

Write a program to enter a sentence from the keyboard and count the number of times a particular word occurs in it. Display the frequency of the search word.

Example:

INPUT:
Enter a sentence: the quick brown fox jumbs over the lazy dog.
Enter a word to be searched: the
OUTPUT:
Searched word occurs : 2 times. [15]
BUY : Computer Application for ICSE: by S.Chand & Co. for SOLUTIONS
Or contact author at attention@computerscienceexpertise.com


Question 8

Write a program to enter any number and print the frequency of each digit present in the number. The digit with multiple frequencies must be printed only once. [15]

Question 9

Write a program using a method Palin( ), to check whether a given number is a prime palindrome or not. You need to check two conditions, one for PRIME and the other for PALINDROME. [15]
KEYWORDS:COMPUTER APPLICATION,2008 ANNA UNIVERSITY CHENNAI M.C.A COMPUTER APPLICATION QUESTION PAPER,ANNA UNIVERSITY QUESTION PAPER,ANNA UNIVERSITY,ANNA UNIVERSITY CHENNAI,ANNA UNIVERSITY COIMBATORE,ANNA UNIVERSITY TRICHY,ANNA UNIVERSITY TIRUNELVELI,ANNA UNIVERSITY MADURAI,ANNA UNIVERSITY SYLLABUS,ANNA-UNIVERSITY RESULTS,ANNA UNIVERSITY DISTANCE EDUCATION,ANNA UNIVERSITY MBA-CENTRE FOR DISTANCE EDUCATION,ANNA UNIVERSITY SCHEDULE OF EXAMINATIONS,ANNA UNIVERSITY ADMISSION,ANNA UNIVERSITY COURSES,ANNA UNIVERSITY ACADEMIC,ANNA UNIVERSITY DEPARTMENTS,ANNA UNIVERSITY RESEARCH,ANNA UNIVERSITY MAIL,ANNA UNIVERSITY QUESTION PAPERS,ANNA UNIVERSITY COUNSELLING DATES,ANNA UNIVERSITY RE-EVALUATION RESULTS