Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
97 views
6 pages
ICSE Computer Solved Paper 2015
Uploaded by
PATASHIMUL GRAM PACHAYAT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ICSE Computer Solved Paper 2015 For Later
Download
Save
Save ICSE Computer Solved Paper 2015 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
97 views
6 pages
ICSE Computer Solved Paper 2015
Uploaded by
PATASHIMUL GRAM PACHAYAT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ICSE Computer Solved Paper 2015 For Later
Carousel Previous
Carousel Next
Download
Save
Save ICSE Computer Solved Paper 2015 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 6
Search
Fullscreen
if(flag == ( System.out printin(c[index] +"-" + wlindex); else ( System.out printin("Sorry NotFound!"); 4 J 1 Name | ‘Type Description wile] | String | To store7 wonders array | and their countries. s String | To store name to be searched. i int | Counter variable. flag int To check the status. index int —_| To store the index | number. COMPUTER APPLICATIONS-2015 SECTION-A (40 Marks) Attempt all questions. Question 1. (a) What are the default values of the primitive data ‘type int and float? [21 (b) Name any too OOP's principles. 121 (oc) What are identifiers ? 21 (a). Identify the literals listed below = el @ 05 ii) “AY Gi) false tiv) “a” (©) Name the wrapper classes of char type and boolean type. BI Answer 1. (a) Default value of int is 0 and float is 0.0f. (b) Encapsulation and Abstraction. (o) Identifiers are a sequence of characters used to name variables, objects, classes, etc. (@ (@ 05isa double/Aoating point literal. Gi) ‘A’ is a character literal. Gii) false is a boolean literal. Giv) “a” is a String literal. (©) For char it is Character and for boolean it is Boolean. Question 2. (@) Evaluate the value of n if value of p = 5, q= 19. intn=(q-p)>(p-9 ? G-P:@- as 2 (o) Arrange the following primitive data types in an ascending order of their size: @ char Gi) byte (ii) double (iv) int [2] (©) What is the value stored in variable res given below : (2) doutle res = Math.pow("345” indexOf’5'), 3); (d) Name the two types of constructors. 2] {e) What are the values of a and b after the following ‘function is executed, if the values passed are 30 and 50; void pauostint a, int b) { gaat; baanb; a=a-bj System.out.prinln(a +“, "+b); } a Answer 2. @) n=14 ) byte, int, © res =8.0 (@) Two types of constructors are (@) Non Parameterized Constructor. Gi) Parameterized Constructor. eg. class Computer (ii) char, (iv) double. String teacher, coaching: public Computer() // Non Para- meterized Constructor t teacher ="Ritu Sharma”; coaching = “Destination Point ‘Computers, MP"; pai Computer(String t, String ¢) // Parameterized Constructor ) (e) Value of a = 50 and b = 30.Question 3. @ ‘e) © &) jure State the data type and value of y after the following is executed : char x = °7", y= Character. isLetter(x); (2) What is the function of catch block in exception handling ? Where does it appear in a progrant ? [2] State the output when the following program segment is executed String a = “Smartphone”, b= "Graphic Art’; String h = a.substring(2, 5); String k= bsubstringt(8).toUpper Caset ); System.out.printin.a); System.out-printin(k.equalsignore Caseth); Q The access specifier that gives ihe most accessibility 5s ssseesestnd the least accessibility is... re) @ Name the mathematical function which is used fo find sine of aa angle given in radians, Gi) Name a string function which removes the, blank spaces provided in the prefix and suffix of astring. [21 (i) What will this code print ? intarr [ ] = new int [5]; System out. printtntarr); @o (b) value stored in arr (0] 0000 (d) garbage value a] Gi) Name the keyword which is used to resolve the conflict between method paremeter and instance variables/felds. a State the package that contains the class : () BufferedReader Gi) Scanner. Write the output of the following prograre code : char che int x= 97; do { ch = (char) x; ‘System out.print(ch + if2%10 = 0) break; +5 J while(x <= 100); Write tie Jour expressions for : a+ 5? Dab [2] If int y= 10 then find int 2 = (44y * (y+ +5); (2) PI Ql An: @ (b) © (ad) te) i) ® @ p Bi swer 3, Data type of y will be boolean and value of y = false. Catch block is a group of Java statements that ate used to handle a raised exception. We can put the code to deal with the execution that might arise, in this block. Catch block appears just after the try block. art true The access specifier that gives che most accessibility is public and the least accessibility is private, () Math.sind Gi) trim, @) @ garbage value Gii) this keyword is used’ to differentiate between local /parameters and global instance variables. (@ Buffered Reader is stored in java.io package. Gi) Scanner is stored in java.util package. abed (atatb*b)/(2*a*b) intz= (Hy * (y++ +5): (1*a1 +5); 17%6 SECTION—B (60 Marks) Attempt any four questions from this Section. The answers in this Section should consist of the Programs in either lue J environment or any program environment ‘with java as the base, Each program should be written using Variable descriptionsiMnemonic Codes 0 that the logic of the program is clearly depicted. Flow-Charts and Algorithms are not required. Question 4. Define a class called ParkingLot with the following description : Instance variables/data members : int uno ~ To store the vehicle number int hours ~To store the number of hours the vehicle és parked in the parking lot double bill - To store the bill mount Member methods + void input )~To input and store the ono and hours. void calculatel )—To compute the parking charge at the rate of €3 for the first hour of part thereof, and © 1.50 for each additional hour of part thereof. void display( )- To display the detail Writea main metitod to create an object of the class sand call the above methods. (aAnswer 4. import java.util”; class ParkingLot t int vno, hows; double bill; void input() { Scanner sc= new Scanner(System.in); System.out printin( “Enter vehicle no. and hours"); yno = scnextint(); hows = scnextint(); } void calculate) | if(hours <= 1) ( bill=3; bill =3 + 1.5 * (hours - 1); } } void display) d System.out printin(yno + + hours 4°" + bill); } public static void main(String args[]) { ParkingLot ob = new ParkingLot(); ob.input); ob.calculate(; ob.display; } yno int _| Tostore the vehicle number. hours int To store the number of hours the vehicle is parked. ill double |To store the bill amount. Question 9. Wrile two separate programs to generate the ‘following patterns using iteration (Joop) statements - fa) * “# tee “ay ete (b) 54321 5432 543 54 5 105) Answer 5. (@) class Pattern t intij; void display() t forli= = Spite) forfj= Lj <=i:j++) { if % 2==0) { System.out.print("#"); 1 else { System.out print("*"); } 1 ‘System. out printin(; int | As a loop variable for executing the outer loop int | As a loop variable for executing inner loop} (b) class Pattern { inti, void display() { for(i = 151 <=5;i44) {for()=5;)>=1;j-> namefi] = br.next(); ( mifi} = br.nextDoubleQ; ‘System.out-print(); mQ{i] = br.nextDoubled; | m3fi = br.nextDouble); System.out.printing; } } for(i =O;icnj ity) (l[i] + m2fi] + m3fi]) / 3.0; BE anes Systemout print(mofi] 1" + nameli); int | As a loop variable for avg >= 85 && avg <= 100) ; 4 executing the outer loop. ; mt are ioep vealabte ey System.out printin("EXCELLENT); executing the inner loop. | else iffavg >= 75 &ée avg <= 84) Question 6. { Write « program to input and store rol! numbers, System.out.printin(‘DISTINCTION"); names and marks in 3 subjects of n mumber students } in five single dimensional arrays and display the remark based on average marks as given below : (The else iffavg >= 60 &eée avg <= 74) i { ‘evant ne weer 100) _ System out pinHIRST CLASS); Average marks Remark else avg >= 40 &fe avg <- 59) 85-100 EXCELLENT ( 75-84 DISTINCTION System.outprintin(’PASS"); | 60-74 FIRST CLASS Le 40-59 Pass ( Less thane 40 POOR Us) System.outprintha("POOR’); Answer 6. ! ienport java.util’; class Remark } t - = int n, , mol]; ‘Description: Sng Taal mae double avg, mi(], 20} m3); mof] | int To store roll number of void display() shidents in one array. t mil] int | To store marks of Scanner br = new Scanner(System in}; students in an array. System.out.printin("Enter no. of students" m2] [int |To store marks of n=brnextint(; students in an array. mo = new int{n]: maf] |int [To store marks of name = new String(n]; students in an array ml = new double{n|; name[] | String |To store names of an2= new double[n]; students in an array. an3 = new double{n avg double To aculeuste average ford Oh ewviee) i int__| Asa loop variable. { em in, Question 7. System.out println("Enter the Details’); Design a class to overload a function Joystring() as ‘mofi] = br.nextint(); ‘follows(i) void joystring (String s, char chi, char ch2) with one string argument and two character arguments that replaces the character argument ch1 with the character argument ch2 in the given strings and prints the new string. Example : Input value ofs = “TECHNALAGY” chi ='A’, ch2 =O" Output : “TECHNOLOGY” (ii) void Joystring (String 5) with one string argument that prints the position of the first space and the last space of the given string s. Example: Input value of ="Cloud computing means Internet based computing” Output : First index :5 Last index : 36 Git) void Joystring (String sl, String s2) with two string arguments that combines the two strings with a space between them and prints Answer 7. the resultant string. Example + Input value of s1 = “COMMONWEALTH” Input value of s2="GAMES” Output : “COMMONWEALTH GAMES” (use library functions) sl class Overload { void joystring(String s, char cht, char ch2) { s=s.replace(ch1, ch2); ‘System.out println(s); } void joystring(String s) { int£ Ly f=s.indexOf{’ '); L=sllastindexO1( 9}; Systern.out.printhn("First index "+0); System.out printin("Last index "+); ! void joystring(String sl, String s2) { Strings =s1+""+ Systern out printin(s); 1 public static void main(String args{)) 4 Overload obj = new Overload(); bj joystring("TECHNALAG ; obj,joystring(’Cloud computing means Internet based computing"); obj joystring(COMMONWEALTH", "GAMES'), tion | Type | Description | String |To store a string} a ‘cht char |To store a character) argument. i ch? char |To store another ‘character argument, | f int To find the position of! first space in the string. , 1 | int To find position of last” | i } space in the string. sl String |To store a string| | argument, s2 String [ze store another string! a Question 8. Write a program to input twenty names in a array. Arrange these names in descending order of alphabets, using the bubble sort teckarique. (35) Answer 8. import java.util; class BSort t inti, j; String namef] = new String{20[ String t; void display() t Scanner br = new Scanner(System.in); forli = 0; i < 20; i++) tl System out printin("Enter a Name"); name[i] = br.next(); H for(i =0;1< 20-1; i++) ( for(j =0;) <19-i;je4) { if{name[j].compareTo (namefj + 1)< { t=namefj}; name[j} = namefj + 1); namelj +1} = t1 1 for(i = 0; i < 20; i++) { System.outprintIn(nameli]); Deseription int | As a loop variable for onter loop. i int | As a loop variable for inner loop. namel] | String | To store 20 names in an array. + | String |Used to store a temporary variable. Question 9. Using the switch statement, write a menu driven program to: Gi) To find and display all the factors of a number input by the user (including 1 and excluding nuraber itself). Example : Sample Input : Sample Output : 1, 3, 5 i) To find and display the factorial of a number input by the user (the factorial of a non-negative integer n, denoted by nl, is the product of all System.outprintin(’L. Factors"); ‘System.out printin("2. Factorial"); ‘System.cut printin(‘Enter Your Choice"); ch=senextint(); System.cut printin("Enter a no."); n=senextint(); switch(ch) { case 1:for(i= 1; i
You might also like
Arihant- Computer 15 th sample paper icse class 10
PDF
No ratings yet
Arihant- Computer 15 th sample paper icse class 10
5 pages
ICSE Computer Solved Paper 2019
PDF
No ratings yet
ICSE Computer Solved Paper 2019
5 pages
CMS PRE-BOARD Question paper Class 10th Computer
PDF
No ratings yet
CMS PRE-BOARD Question paper Class 10th Computer
9 pages
2018 Icse
PDF
No ratings yet
2018 Icse
23 pages
Comp Theory (2)
PDF
No ratings yet
Comp Theory (2)
5 pages
Icse 2015 Computer Application Class 10
PDF
No ratings yet
Icse 2015 Computer Application Class 10
5 pages
Computer Applications ICSE Sample Paper 2 PDF
PDF
100% (1)
Computer Applications ICSE Sample Paper 2 PDF
5 pages
ICSE Question Paper
PDF
No ratings yet
ICSE Question Paper
121 pages
JNS Ca Prelim 1 Paper
PDF
No ratings yet
JNS Ca Prelim 1 Paper
9 pages
com2016
PDF
No ratings yet
com2016
13 pages
42ee4513-7a82-4221-bc3a-ceeb1fcfe462
PDF
No ratings yet
42ee4513-7a82-4221-bc3a-ceeb1fcfe462
8 pages
Kisa Preparatory Paper Computer Applications
PDF
No ratings yet
Kisa Preparatory Paper Computer Applications
6 pages
Isce Computer Previous Yr Question Ppr. (2019-2014)
PDF
No ratings yet
Isce Computer Previous Yr Question Ppr. (2019-2014)
123 pages
X-CTA-Second-Prep QP-24-25
PDF
No ratings yet
X-CTA-Second-Prep QP-24-25
8 pages
II Prelim Revision 2024 computer
PDF
No ratings yet
II Prelim Revision 2024 computer
5 pages
COMPUTER X 1st Term
PDF
No ratings yet
COMPUTER X 1st Term
5 pages
ICSE 2015 Computer Applications Solved Paper
PDF
No ratings yet
ICSE 2015 Computer Applications Solved Paper
17 pages
Paper Class 10th 2024-25
PDF
No ratings yet
Paper Class 10th 2024-25
6 pages
COMPUTER APPLICATIONS prac
PDF
No ratings yet
COMPUTER APPLICATIONS prac
9 pages
Computer Applications
PDF
No ratings yet
Computer Applications
3 pages
Nishanth X D Computer Applications Home Test
PDF
No ratings yet
Nishanth X D Computer Applications Home Test
11 pages
10TH Icse 2023
PDF
No ratings yet
10TH Icse 2023
9 pages
X Computer Pre Board I
PDF
100% (2)
X Computer Pre Board I
4 pages
Key Answers Kisa Preparatory Computer Applications
PDF
40% (5)
Key Answers Kisa Preparatory Computer Applications
9 pages
cpk
PDF
No ratings yet
cpk
5 pages
com2018
PDF
No ratings yet
com2018
10 pages
2018
PDF
No ratings yet
2018
17 pages
Preparatory 1
PDF
No ratings yet
Preparatory 1
6 pages
10 Computer Applications HY 23-24
PDF
No ratings yet
10 Computer Applications HY 23-24
7 pages
2015
PDF
No ratings yet
2015
19 pages
QMS PREBOARDS COMPUTER APPLICATIONS
PDF
No ratings yet
QMS PREBOARDS COMPUTER APPLICATIONS
8 pages
10th Computer FLT Paper 22.09.2024
PDF
No ratings yet
10th Computer FLT Paper 22.09.2024
6 pages
ICSE 2018 Solutions
PDF
No ratings yet
ICSE 2018 Solutions
7 pages
grade-10-ca-qp
PDF
No ratings yet
grade-10-ca-qp
8 pages
Preboard 1 x
PDF
No ratings yet
Preboard 1 x
6 pages
(2012) ICSE Computer Applications Question Paper
PDF
100% (1)
(2012) ICSE Computer Applications Question Paper
6 pages
ch1 Part B
PDF
No ratings yet
ch1 Part B
19 pages
Part B
PDF
No ratings yet
Part B
19 pages
com2017
PDF
No ratings yet
com2017
11 pages
MCPS Prelim Jan 2023
PDF
No ratings yet
MCPS Prelim Jan 2023
4 pages
861 Cta - 2017 PDF
PDF
No ratings yet
861 Cta - 2017 PDF
6 pages
Icse 2023 Paper With Solutions
PDF
No ratings yet
Icse 2023 Paper With Solutions
18 pages
Sample 3 Oswaal
PDF
No ratings yet
Sample 3 Oswaal
5 pages
lokhandwala school_comp
PDF
No ratings yet
lokhandwala school_comp
6 pages
Icse 2023 - 861 Cta
PDF
No ratings yet
Icse 2023 - 861 Cta
8 pages
PreBoard___02 (1)
PDF
No ratings yet
PreBoard___02 (1)
6 pages
ICSE Class 10 Computer Applications
PDF
60% (5)
ICSE Class 10 Computer Applications
68 pages
compt 1
PDF
No ratings yet
compt 1
5 pages
CBS Computer Application
PDF
No ratings yet
CBS Computer Application
5 pages
Computer Applications (2023)
PDF
No ratings yet
Computer Applications (2023)
8 pages
Icse Sample Paper-5 For Computer Applications
PDF
No ratings yet
Icse Sample Paper-5 For Computer Applications
4 pages
10 Computer Applications
PDF
No ratings yet
10 Computer Applications
6 pages
Comp_10_Selection Exam(2)
PDF
No ratings yet
Comp_10_Selection Exam(2)
6 pages
2025 COPPER Maneckji
PDF
No ratings yet
2025 COPPER Maneckji
7 pages
computer preboard
PDF
No ratings yet
computer preboard
7 pages
Com 2019
PDF
No ratings yet
Com 2019
11 pages
Darhil Computer Project
PDF
No ratings yet
Darhil Computer Project
19 pages
AOASS Selection
PDF
No ratings yet
AOASS Selection
8 pages
SGHS Maths Prelim
PDF
No ratings yet
SGHS Maths Prelim
8 pages
X-Periodic Properties Test - 2023 - Answer Key
PDF
No ratings yet
X-Periodic Properties Test - 2023 - Answer Key
6 pages
Class 10 Banking
PDF
No ratings yet
Class 10 Banking
3 pages
Icse Mathematics MCQ Banking
PDF
100% (1)
Icse Mathematics MCQ Banking
3 pages
ACFrOgBU3KPD1S0xTle6yujNFguNw6uiSdItUdjaV3zH61rHn0yy - PWR xYW4OlTWnjsH9 atNv6B egZhA1ELD6oBKmlFg7i0zjnGaF2eO1wPuLuCY wsqkYqM1jO4
PDF
No ratings yet
ACFrOgBU3KPD1S0xTle6yujNFguNw6uiSdItUdjaV3zH61rHn0yy - PWR xYW4OlTWnjsH9 atNv6B egZhA1ELD6oBKmlFg7i0zjnGaF2eO1wPuLuCY wsqkYqM1jO4
3 pages
Introduction To Trigonometry PYQS On Latest Syllabus
PDF
No ratings yet
Introduction To Trigonometry PYQS On Latest Syllabus
8 pages