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)
8 views
Computer Applications
Uploaded by
aneeshms2007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Computer Applications For Later
Download
Save
Save Computer Applications For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
8 views
Computer Applications
Uploaded by
aneeshms2007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Computer Applications For Later
Carousel Previous
Carousel Next
Save
Save Computer Applications For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 4
Search
Fullscreen
CARMEL ENGLISH SCHOOL Padmanabhanagar,Bengaluru ~70 PREPARATORY EXAMINATION-2022 -23 STANDARD: X [ ICSE] SUBJECT: COMPUTER APPLICATIONS Time:? hr: ‘MaxMarks:100 ‘Answers to this Paper must be written on the paper provided separately. You will not be allowed 10 write during the first ISminutes. This time isto be spent in reading the question paper. The time given at the head of this paper is the time allowed for writing the answers. Section A(10 marks) Attempt all the questions Question ‘Choose the correct answers to the questions from the given options. (Do not copy the question, Write the correct answer only.) (20) 1) Which of the following is a valid java keyword? a) int ') System. ~ String 4) All of the above 2) double x=150.50; Which of the following methods can be used to convert x to String object. a) Double.parseDouble() ») String. valueOR) ©) Double.toString() @) Both b and c 3) The variables x and y in the statement, void cale( int x, int y) are called as_ a) Actual Parameters b) Instance variables ©) Static variables 4) Formal Parameters 4) Choose the correct output for th String s1="provide", s2="prope System.out.printin(s1.compareTo(s2)); a6 br o-6 dl 5) What is the maximum value that the following statement will evaluate to? X = (int)(Math.random()*6); following code. as b) 5.0 6 60 > 6) Memory space allocated for float data type i * bits. a4 b) 32 ©)8 d) 64 7) The return type of trim() function is ) boolean b) int ) double 4) String 8) The appropriate statement to extract the last character of a steing Str is, 4) char c= Str.chart(Str.length()); ») char c= Str.charAt(Str.length( )-1); ¢) char e= Str.charAt(Str-length( )-2); 4) char c= Str.charAt(Strlength-1); 9) The output of the following code is__. char af] = {65/2',b"}; System.out.printin(af !}+af2]); A a) 195 b) ab ©) 162 4d) error 10) Converting int variable to an object of Integer class is an example of a) Type casting ) autoboxing ©) unboxing, 4) None of the above11) A data member declared as public is accessible 8) within the class ») within the package c) outside the package d) All of the above 12) is an exit-controlled loop. 2) for loop ) while loop c) do..while loop d) All of the above 13) The return type of Math.round() is__ a) double b) int c)long — d) both bande 14)____ is the result of "Dedication" substring (4,8). a) catio b) icati c) cati d) icat 15) The principle that is implemented through function overloading 2) abstraction ») encapsulation ) polymorphism 4d) inheritance 16)___ is the output on executing the following code. int a= -7; if{a>10) if{a % 3 == 0) System.out.printin(Math.sqrt(25)); else System.out printin(Math.cbri(8)); else System.out printin(Math.ceil(-17.8)); a)5.0 b) 2.0 ©) 170 4) error 1» operator has the higher precedence from the following list of operators. 1 ay+ b< °) d)% 18) Determine how many times the following loop will be executed and state the output. int sum=0: for(int i= 1:i<=5;i++) { sumt=+4i; 3 System. out printin(sum); a) 5 times of execution & the output is 15 __b) 3 times of execution and the output is 12 ©) 4 times of execution and the output is 16d) None of the above 19)__ is the output on executing the following statement:- System.out.printIn("run".compareTo Ignore Case("RUNNER")); a3 b)-32 b)-3 4) 32 20) Wrapper classes are defined in the package. a) lang b) util c)default d) io Question 2 1) Define Operator. Give two examples for logical operators 2) Give the memory size of the following(in terms of bytes). a) String a= "run"; b) Boolean b{] ~ new boolean{5}; 3) Write the equivalent java expression for the following:- 2) (2) 12]4) Give the output for the following:- 2] a) int x=1500, y=500; X=XHH2 + yt; System.out printin (x+"\n"+y); b) String x="125", y="2.345"; ‘System. out.printin (Integer. valueOf(x)/2); ‘System. out.printin(x.ends With("S")&&y.endsWith("5")); 2) ©) int a=60, result; (1) result= (a>= 80)24:((a>=60)26:8); System.out printin(result); 5) Name the keyword:- RI a) That forces early iteration of the loop. b) That is used to define symbolic constants in the program. 6) Rewrite using while loop: 22] for(int i1i<=S;i+4)5 System.out printin(“Hello”); 7) Observe the following code and answer the questions given below:~ Execute(char a) { x=a; } a) Write the statement to invoke the above uni tw b) Name the class name of the above unit and its data member. Qi 8) Rewrite the following code using if else if statement:- 2 switch(ratings) { case 1 case 2: amt = 2000; break; case 3: amt = 4000; break; default :System.out.printin(“Invalid”); 3 SECTION-B (60Marks) Attempt any four questions 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 no required. Question3 [15] Define a class cyber having the following description: Data members/Instance variables String name- user’s name int hours- number of hours worked int bill- amount to be paidMember functions: a) parameterized constructor — to initialize the user's name and the number of hours worked. ’b) void calculate()- to calculate the amount to be paid based on the following criteria: Number of hours worked Amount/hr (in Rs) For the first 2 hours 20 For the next 3 hours 10 For the remaining hours 8 ©) void display()- to display the bill in the following format: SLNo Username ‘Time Amount Write a main () method to create an object for the above class and call the functions. Question 4 {15} Design a class with the following overloaded functions:- a) void perform(int n) To display the sum of all odd factors of the argument n ifn is an odd number otherwise display product of even factors of n. b) void perform(int m, int n) To display the sum of m! and n! Hint: 4! = 1*2*3*4 ©) void perform(int m, int n, int q) ‘To display the maximum of the three numbers using Math class method. ‘Question § 115) Write a menu driven to perform the following: a) To display the given series 9, 99, 8, 89, 7, 79, 6, 69, 5, 59, 4, 49, 3, 39, 2, 29, 1, 19 b) To evaluate the series S=24+4+6+.......upto n terms ‘Question 6 [15] Write a program to accept 30 integer elements in an array and perform the following:~ a) Sum of the last 10 elements b) Count of negative numbers present in the first 10 elements. Question 7 [1s7~ Write a program to store the given 10 country names in an array and arrange in the reverse alphabetical order using bubble sort. Also display the number of country names that has at least $ alphabets in it. India, Bangladesh, Nepal, Pakistan, Canada, Egypt, Spain, Zimbabwe, Russia, Hungary uestion 8 {15} Write a program to accept a string(str)and perform the following:- 1) Display the number of double letter sequence characters present in it, For example:- The number of double sequence characters in grasshopper is 2. 2) Create a new string by converting all the alphabets present in odd index position to uppercase using wrapper class method. “EE +
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6125)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brené Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (932)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8214)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2922)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Toibin
3.5/5 (2061)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2619)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2530)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Steve Jobs
From Everand
Steve Jobs
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel