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)
64 views
Class 10 Computer Solved 1-3
FRANK Computer Solved 1-3
Uploaded by
debjitdutta556
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 Class 10 Computer Solved 1-3 For Later
Download
Save
Save Class 10 Computer Solved 1-3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
64 views
Class 10 Computer Solved 1-3
FRANK Computer Solved 1-3
Uploaded by
debjitdutta556
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 Class 10 Computer Solved 1-3 For Later
Carousel Previous
Carousel Next
Download
Save
Save Class 10 Computer Solved 1-3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 45
Search
Fullscreen
Model Test Paper (Solved) SECTION A (40 Marks) Attempt all questions. QUESTION 1. Choose the correct answer and write the correct option. (20) (i) The small individual unit used in java program having some meaning to its language compiler is termed as. (a) Operators (6) Keywords (©) Identifiers (d) All the above Ans: (d) All the above [Note: Smallest individual unit used in java program is known as token. Ex: Operators, Keywords, Identifiers etc.] (ii) Java Interpreter which converts java byte code to Machine code is known as: (@ Library Class () JVL (c) JVM (d) API Ans: (c) JVM (iii) ______ is an assignment operator. (a) = ) (o) I= (d) All the above Ans: (b) INote: are the relational operators.) (iv) Math.cbrt(64.00) results to. (@) 8 () 2 () 32Model Test Papers 185 (a4 Ans: (d) 4 fo) Number of bytes occupied by char chl] with size 10. fa) 20 (b) 30 (co) 40 (d) 50 Ans: (a) 20 [Note: char occupies 2 bytes in memory hence, 2 *10 = 20) (vi) A method with same name as of its class name is termed as (a) Method overloading (6) Parameterised method (©) Constructor (d) Package Ans: (b) Constructor (vii) When a primitive data type is converted to the corresponding object of its class, it is termed as: (a) Boxing (b) Explicit type conversion (©) Unboxing (d) Implicit type conversion Ans: (a) Boxing [Note: Explicit Type Conversion: Converting a higher data type into lower type forcefully by the user is known as Explicit conversion or type casting. Unboxing: Converting an object of a Wrapper class (Integer) to its corresponding primitive typelint) is known as Unboxing] Implicit Type Conversion: The conversion in which the lower data type gets converted to higher data type. Data type without any intervention by the user is known as Implicit Type Conversion.] (viii) To find length of the array. (a) size (b) concate fo) length (d) length Ans: (d) length (ix) Parameters used at function definition: (a) Actual Parameters (6) Formal Parameters (c) Default parameters (d) None the above Ans: (b) Formal Parameters186 ICSE Computer Applications Papers [Note: Actual Parameters - Parameters used at function call side. Deafault parameters - No parameters used within the function (x) If a=10, result of a*= a++ - +4b 4a; ja) 18 (b) 0 ic) 180 (d) 12 Ans: ‘c) 180 [Working: a=10*(10 - 3 + 11), a= 10*18, a=180] xi) Method to convert String to lowercase is ‘a) TolowerCase() (b) toLowerCase() (ec) tolowert) (d) tolowercase() Ans: (b) toLowerCase() (xii) The element in a[3+1] of the array (1,3,5,7,9,11,13) is: @ 7 (b) i} (dd) Ans: (c) 9 (ziti) The output of the method “COMPUTER APPLICATION" substring(0,11) is: (a) COMPUTER APPL (») COMPUTER AP (c) COMPUTER APP (d) COMPUTER A Ans: (b) COMPUTER AP (xiv) The corresponding wrapper class of the int data type is: Koos (a) Integer (b) INTEGER (c) Int d) int Ans: (2) Integer (av) Number of bits occupied by double type variable (a) 8 (b) 16 (e) 32 (d) 64 Ans: (4) 64 INote: 1 byte = 8 bits hence, double data type holds 8 bytes=8 x & bits=64 bits)Model Test Papers 187 ee (xvi) class A f int a=5; public void disp() t ! } Identify the scope of the variable a. (a) Instance variable (b) Class Variable (c) Local Variable (d) None of the above Ans: (a) Instance variable (xvii) The return type of the library function compareTo() is: (a) boolean (6) int (c) char (d) string Ans: (b) int (xviii) for(; iitem) usm-1; £(f System.out rint1n (“Search Successful"); out.printin ("Number is not present”); tem.out. rModel Test Papers Variable Description Variable Name | Data Type | Description nf) int to store 10 integers item int to store the value to search i int to run the loop 1 int to store the lowest index position u int to store the upper index position m int to store middle index position f int to store the flag value, i.e. 0 for false and 1 for true Write a program to input a sentence and display the toggled sentence. Input: WelCome to School Output: wELcOME TO sCHOOL (15) Ans, import java.util.* class toggleSentence { public static void main(String args[]) Scanner sc=new Scanner (System. in) i String s,sl=""7 char chi int i; System.out.println ("Enter any sentence”); s=sc.nextLine(); for (i=0;i
5éed154sdmax)Model Test Papers — _—_c rre_er'seorerereeeeeerr max=ar (i); if (ar[i]
80000) allow(i]=basic[i]*0.30; else if(basic[i]>50000 && basic[i]30000 4% basic{i]1800?500:300; System. out.printin(s)+ Ans. (i) 300 (i) 500 (vii) What is the function of the new operator? 2) ‘Ans. The new operator is used to create an object of a class and associate the object with a reference variable that names it, eg., ew Kps(); //a new object of class Kps is created and the reference variable ob is associated with it. (viii) What is a Wrapper class? Give an example. 7 ‘Ans. Java's primitive data types are data values and not class objects. Wrapper classes convert primitive data types as objects. We can create an object of byte type from its wrapper class as follows: (5);//a Byte object created having value 5.Model Test Papers 29 tix) Differentiate between equala() and compareTo () methods. fa) equala) compare Tot) () It checks the equality between 7) It also checks the other relations two strings. between two strings. (2)_Tt returns boolean type of value, (ii) It returns integer type of value. (x) What is a default constructor? fay Ans, A default constructor is a constructor which does not have any parameters but initialises the instance variables with default values. It is automatically executed at run time. 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 Description /Mnemonic Codes such that the logic of the program is clearly depicted. Flowcharts and Algorithms are not required. Write a program to enter any sentence and display the frequency of each character. U5) Ans. import java.util. class charFreq { public static void main(String args(]) { Scanner sc=new Scanner (System. in); string si int 1,i,c=1/37 system.out printIn("Enter any sentence :"); s=sc.nextLine()i slengthQ)s char ch [J=new char[1],t7 pislsitt) ch[i]=s-charAt (1)ive) if(ch{j}>ch{541]) { tech{jle eh(3)=ch(5+11 chij+1]=te } ) for (i=0;imax) max=ar lil; system.out ntin ("The largest ime number: ”+max) 7 ntln("The lowest number: ”+min);Model Test Papers Variable Description Variable Name Data Type Description Bebe ar{} int An array to store integers n ‘To store size of the array max ‘To store maximum element in the array min ‘To store minimum element in the array c ‘To count the factors ‘To know the logic state(1-true,0-false] Write a program to input marked price of a product from the user and calculate and display the discount amount and the amount after discount paid by the user, where discount is calculated based on the given conditions. (15) Marked Price (in @) Discount % Up to 5000 4% 5001-10000 8% 10001-20000 10% Above 20000 12% Ans: import java.util.*; class markedPrice { public static void main(String args{]) ‘ Scanner sc=new Scanner (System.in); double mp, d=0.0; system.out .printIn(“Enter marked price of a product"); mp=sc.nextDouble () if (mp
You might also like
Program Codes For Internal Assessment (Class 9)
PDF
No ratings yet
Program Codes For Internal Assessment (Class 9)
16 pages
Class 10 Computer Notes
PDF
No ratings yet
Class 10 Computer Notes
163 pages
Icse Theory Questions
PDF
No ratings yet
Icse Theory Questions
21 pages
Class 10 Computer Solved 4-7
PDF
No ratings yet
Class 10 Computer Solved 4-7
56 pages
Icse Class X Computer Application Project
PDF
No ratings yet
Icse Class X Computer Application Project
13 pages
PreBoard_24_25
PDF
No ratings yet
PreBoard_24_25
5 pages
Icjecapu 01
PDF
0% (1)
Icjecapu 01
7 pages
My Class 10 Icse Computer File
PDF
No ratings yet
My Class 10 Icse Computer File
44 pages
Computer Science
PDF
No ratings yet
Computer Science
6 pages
,,,,
PDF
No ratings yet
,,,,
44 pages
Chapter On Strings - Class 10
PDF
No ratings yet
Chapter On Strings - Class 10
51 pages
Assertion Reasoning
PDF
No ratings yet
Assertion Reasoning
3 pages
Class 9 Computer Applications (Finals 20-21)
PDF
No ratings yet
Class 9 Computer Applications (Finals 20-21)
5 pages
Computer Project Isc Class 11 1st Term
PDF
No ratings yet
Computer Project Isc Class 11 1st Term
49 pages
Computer Applications ICSE Worksheet
PDF
No ratings yet
Computer Applications ICSE Worksheet
2 pages
Computer Project Icse Class 10 Example (For Hint Purpose Only)
PDF
No ratings yet
Computer Project Icse Class 10 Example (For Hint Purpose Only)
22 pages
Grade 10 ICSE Assignments - Internal Assessment
PDF
0% (1)
Grade 10 ICSE Assignments - Internal Assessment
6 pages
3rd HFS Thane ICSE10 Maths Prel-1 2020-21-Unprotected
PDF
No ratings yet
3rd HFS Thane ICSE10 Maths Prel-1 2020-21-Unprotected
5 pages
Propositional Logic
PDF
No ratings yet
Propositional Logic
6 pages
Computer Science ISC Sample Paper 2 PDF
PDF
No ratings yet
Computer Science ISC Sample Paper 2 PDF
9 pages
ICSE Class 10 Sample Paper 6
PDF
No ratings yet
ICSE Class 10 Sample Paper 6
2 pages
Class 11 Computer Science Project ISC Board
PDF
No ratings yet
Class 11 Computer Science Project ISC Board
16 pages
Computer - IX
PDF
No ratings yet
Computer - IX
4 pages
Sample Paper 1
PDF
No ratings yet
Sample Paper 1
13 pages
X Comp EVII 24 25
PDF
No ratings yet
X Comp EVII 24 25
7 pages
ICSE BlueJ Theory
PDF
No ratings yet
ICSE BlueJ Theory
16 pages
868 Computer Science Paper 1
PDF
No ratings yet
868 Computer Science Paper 1
10 pages
ISC Computer Sample Paper Solved
PDF
100% (1)
ISC Computer Sample Paper Solved
9 pages
Project Work Class - 9 Computer Applications: Hint: No. of Share (Annual Dividend 100) / (Nominal Value
PDF
0% (2)
Project Work Class - 9 Computer Applications: Hint: No. of Share (Annual Dividend 100) / (Nominal Value
7 pages
Computer SC Specimen QP Class Xi
PDF
0% (1)
Computer SC Specimen QP Class Xi
7 pages
Computer Application Project Icse 2021 PDF
PDF
No ratings yet
Computer Application Project Icse 2021 PDF
1 page
Using Library Classes and Packages
PDF
No ratings yet
Using Library Classes and Packages
20 pages
Java Programs For Class X Project
PDF
No ratings yet
Java Programs For Class X Project
9 pages
Board Exam Questions On Strings
PDF
No ratings yet
Board Exam Questions On Strings
6 pages
REcurssion edited
PDF
No ratings yet
REcurssion edited
16 pages
Question Bank For CBT (Class Ix Icse) 2020
PDF
No ratings yet
Question Bank For CBT (Class Ix Icse) 2020
14 pages
Icse Sample Paper-1 For Computer Applications
PDF
100% (1)
Icse Sample Paper-1 For Computer Applications
5 pages
Chapter 4-Input
PDF
No ratings yet
Chapter 4-Input
15 pages
ICSE Computer Mock 2
PDF
No ratings yet
ICSE Computer Mock 2
5 pages
Pratice Sheet Java - If Switch
PDF
No ratings yet
Pratice Sheet Java - If Switch
4 pages
Isce Computer Previous Yr Question Ppr. (2019-2014)
PDF
No ratings yet
Isce Computer Previous Yr Question Ppr. (2019-2014)
123 pages
Nirmal Jha Notes
PDF
No ratings yet
Nirmal Jha Notes
17 pages
Model Question Paper Class-XI Computer Science M.M.:70 Time:3 Hrs
PDF
No ratings yet
Model Question Paper Class-XI Computer Science M.M.:70 Time:3 Hrs
19 pages
Primitive Values, Wrapper Classes, Types and Casting
PDF
No ratings yet
Primitive Values, Wrapper Classes, Types and Casting
6 pages
0llcomputer Applications ICSE 10th Answer Organized 1
PDF
No ratings yet
0llcomputer Applications ICSE 10th Answer Organized 1
86 pages
ISC 2016 Class 12 Computer Science Paper
PDF
No ratings yet
ISC 2016 Class 12 Computer Science Paper
8 pages
ICSE Computer Project
PDF
75% (4)
ICSE Computer Project
51 pages
X-CTA-Practice Paper 2022-23
PDF
No ratings yet
X-CTA-Practice Paper 2022-23
13 pages
ICSE Class 10 Computer Application Sample Paper
PDF
No ratings yet
ICSE Class 10 Computer Application Sample Paper
3 pages
Class 10 Mathematics Specimen
PDF
No ratings yet
Class 10 Mathematics Specimen
11 pages
ISC 2015 Computer Science Paper 2 Practical
PDF
No ratings yet
ISC 2015 Computer Science Paper 2 Practical
4 pages
10 ICSE - Computer Application - I Preparatory Exam - 2024-25
PDF
No ratings yet
10 ICSE - Computer Application - I Preparatory Exam - 2024-25
6 pages
slab based programs-1
PDF
No ratings yet
slab based programs-1
7 pages
Operator Precedence in Java
PDF
No ratings yet
Operator Precedence in Java
2 pages
STD 12 Chapter 9 Working With Array and String Textual Exercise and Previous Years Board Papers
PDF
100% (1)
STD 12 Chapter 9 Working With Array and String Textual Exercise and Previous Years Board Papers
10 pages
Annual Exam COMPUTER SC Class XI
PDF
No ratings yet
Annual Exam COMPUTER SC Class XI
8 pages
Function Overloading - Icse Board Question 2009
PDF
No ratings yet
Function Overloading - Icse Board Question 2009
1 page
XPaper18(Solved)
PDF
No ratings yet
XPaper18(Solved)
10 pages
GR 10 CTA QP Sample Paper
PDF
No ratings yet
GR 10 CTA QP Sample Paper
9 pages
ICSE 2015 Computer Applications Solved Paper
PDF
No ratings yet
ICSE 2015 Computer Applications Solved Paper
17 pages
Class 10 Computer Specimen
PDF
No ratings yet
Class 10 Computer Specimen
15 pages
CH 1. Networking
PDF
No ratings yet
CH 1. Networking
20 pages
CH 6. Networking
PDF
No ratings yet
CH 6. Networking
22 pages
CH 2. Networking
PDF
No ratings yet
CH 2. Networking
14 pages
CH 7. HTML
PDF
No ratings yet
CH 7. HTML
30 pages
CH 4. Networking
PDF
No ratings yet
CH 4. Networking
12 pages
CH 5. Networking
PDF
No ratings yet
CH 5. Networking
24 pages
CH 3. Networking
PDF
No ratings yet
CH 3. Networking
12 pages