Trending ▼   ResFinder  

ICSE Prelims 2016 : Computer Applications [PREDICTIVE]

3 pages, 50 questions, 50 questions with responses, 217 total responses,    0    0
Arpan Bhattacharya
St. Xavier's School, Durgapur,  Durgapur 
+Fave Message
 Home > arpan82000 >   F Also featured on: icse_prelims

Formatting page ...

COMPUTER APPLICATIONS SUGGESTIVE QUESTION PAPER Section A All questions are compulsory. (40 marks) Prepared by: Arpan (10+10+20) 2mks/subpart Question 1 a) Differentiate between an object and a class. b) Objects encapsulate state and behaviour Explain and give two real world examples. c) Name the following: 1. Non-static variables that define the characteristics of an object of a class 2. Static variables that can be accessed without creating an object 3. Variables declared inside methods, which are not assigned a default value automatically 4. A user-defined data type that has its own functionality d) Differentiate between primitive data types and composite data types. e) Name the OOP principle that deals with... 1. Super-classes and sub-classes. 2. Method overloading 3. Data hiding; Access modifiers like public, private, protected et cetera. 4. Interfaces and abstract classes Question 2 a) Differentiate between the access specifiers public, protected and private. b) Name the following: 1. A brute force search algorithm that runs in linear time 2. A dichotomic divide-and-conquer search algorithm that works only for sorted data 3. Two O(n2) sorting algorithms, unsuitable for large datasets. c) Name the package that contains: 1. The InputStreamReader class 2. The Scanner class 3. Wrapper classes of primitive types 4. The String class d) With reference to method valueOf in java.lang.String, answer the following questions: 1. Is this method static or non-static? Give an example of its usage. 2. How does this method utilise the OOP principle, polymorphism? e) With reference to method sqrt in java.lang.Math, answer the following questions: 1. Is this method pure or impure? 2. Is this method called by value or reference? Question 3 a) What are the return types of the below methods of the String class? 1. concat 2. replace 3. equals 4. compareTo b) To which classes do the below methods belong? 1. readLine 2. isWhitespace 3. random 4. nextLine c) Differentiate between a default constructor and a parameterised constructor? Name a class that has overloaded constructors. d) Name five keywords that help in handling exceptions. e) Explain the purpose of the keywords break, continue and return. f) String p = gorilla , q = CHIMP ; p.toUpperCase(); q = q.toLowerCase(); x = q.compareTo(p); //What ll be the value of p and q after the execution of this code snippet? /*What is the type and value of the variable x?*/ //Differentiate between single-line and multiline comments. f) Describe the Math functions floor, ceil, rint and abs. h) 1. Math.log(x) returns the log of x to the base ___. 2. ___ returns a pseudo-random floating point number strictly lesser than one, greater than zero. 3. Arrays are objects of the ___ class. ___ is a public instance variable that holds an array s size. 4. The classes Exception and Error are the subclasses of ___. i) State the value of school_code and serial_no when the following code is executed. String index_no = "1161514/045"; int n = s.indexOf( / ); int school_code=Integer.parseInt(s.substring(0,n)); int serial_no=Integer.valueOf(s.substring(n+1)); j) System.out.print((false)? A :66); //What s the output? Section B (60 marks) Attempt any four questions. (15*4) 1. Write a program that reads a sentence (comprising space separated words) from standard input, splits the sentence into words, stores the words in an array, bubble sort the array of words, reads a word from the standard input and looks for the word in the array it just created using binary search. 2. Write a menu-driven program that reads the names and seven-digit UIDs of N students, and selection-sorts them in the order of their names or UIDs as desired by the user. 3. Write a program that reads the address of a file/webpage on the internet from standard input and outputs the domain name (examples: google.com/mit.edu/quora.com/respaper.com), type of the website (commercial for .com, organisation for .org, educational for .edu and other for anything else) and the name of the file/page (without the extension.) Examples: ----------------------------------------Input: www.mit.edu/index.htm Domain Name: mit.edu Type: Educational Name: index ----------------------------------------Input: ask.fm/user/userlogin.aspx Domain Name: ask.fm Type: Others Name: userlogin ----------------------------------------[NOTE: This is a question on String Manipulation. Don t use the built-in URL/File handling classes of Java.] 4. Design a class Word to store a word and its definition. Read a list of N words and their definitions from standard input and use an array of Word objects to store them. Bubble-sort the words [alphabetical order] and display the sorted list of words along with their definitions. 5. Write a program to check whether a number N s factorial is divisible by the sum of all its prime factors. 6. Write a program to print the first N Fibonacci numbers mod 10 in the following format 0 11 235 8314 and so on... For the clueless, here s the Fibonacci Series, computer science s favourite sequence: 0, 1, 1, 2, 3, 5, 8, 13.... [F1 = 0, F2 = 1, Fi=F(i-1)+F(i-2).]

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Ritwik Lal

(40)

appuaparna

(35)

Sceenex

(25)

Mocking Jay

(25)

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : icse,  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

arpan82000 chat