Trending ▼   ResFinder  

st.anns vijayawada

5 pages, 44 questions, 0 questions with responses, 0 total responses,    0    0
Dimple Ammisetti
  
+Fave Message
 Home > dimplesatyapravallika >   F Also featured on: School Page opboy

Formatting page ...

CLASS X:- COMPUTER APPLICATIONS (THEORY) (TWO HOURS) Answer 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. You are to answer all the questions from Section A, and any four questions from Section B The intended marks for each questions or parts of questions are given in brackets[ ]. * * * * * * * * * * * ** * * * * * * * * * ** * SECTION A (40 Marks) Attempt ALL questions. While answering questions from this part, indicate briefly your working and reasoning, wherever required. Question 1:- Answer the following. a. Call by value and call by reference. [2] b. Local and Global variables. [2] c. Actual and Formal Parameters. [2] d. Give Syntax and example of Nested Conditional Operator. [2] e. Function/Method and Constructor. [2] Question 2:- Define the following. a. Define Function Signature. b. Define Function Overloading. c. Define loop. d. Define Nested loop. e. Define default constructor. f. Define Java package. g. Define condition? h. Define null loop. i. Define Compound statement. j. Define Static binding or early binding. Question 3:- Answer the following as per the given instructions. a. String s1 = Application ; String s2 = Computer ; String s3 = s2.substring(0,3)+ uni +s1.substring(5); 10x1=10 [20 Marks] [1M] System.out.println(s3); b. String s = PROGRAM ; System.out.println(s.lastIndexOf(s.charAt(4)); System.out.println(s.length( )); [2M] c. Write the output of the following statements. i. System.out.println(Math.sqrt(6.25)); ii. System.out.println(Math.min(-3.5, - 9.5)); iii. System.out.println(Math.pow(6.25,2)); iv. System.out.println(Math.abs(-9.99)); v. System.out.println(Math.rint(8.92)); vi. System.out.println( Math.pow(5.0, -2.0)); [3M] d. String n1= 46 , n2= 64 ; [2M] int tot = Integer.parseInt(n1)+Integer.valueOf(n2); System.out.println( The sum of + n1+ and + n2 + is + tot); e. String x = I Love India , y = Delhi is Capital ; System.out.println(x.subtring(7)+y.substring(9)); System.out.println(x.subtring(0,7)+y.substring(0,6)); [2M] f. Name the data type of the following. [2M] i. A 64 bit integer is used when you need a range of values wider than those provided by int. ii. A single 16 bit Unicode Character whose default value is \u0000 . g. State the method that : [2M] i. Convert a string to a primitive float data type. ii. Determines if the specified character is an uppercase character. h. State the output of the following program segment. String s = Examination ; int n = s.length( ); i. System.out.println(s.startsWith(s.substring(5,n))); ii. System.out.println(s.charAt(2) = = s.charSt(6)); i. State the value of n and ch. char c = A ; int n = c+5; [2M] [1M] char ch = (char)n; System.out.println(n + , + ch); j. String st = PROGRAM ; System.out.println(st.indexOf(st.charAt(4)); ii. String m = ComputerApplications ; int n = m.lastIndexOf(m.charAt(12)); System.out.println(n); [2M] k. Write the statement for the following. To replace the word blue with red in the String s = blue bottle is in blue bag lying on the blue carpet [1M] 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. ************************************* Question 4:Design a class Overload a function num_calc( ) as follows; a. void num_calc(int num, char ch) with one integer argument and one character argument, computes the square of integer argument if ch is s other wise compute its square root. b. void num_calc(int a, int b, char ch) with two integer arguments and one character argument, computes the product of integer arguments if ch is p other wise compute its sum. c. void num_calc(String s1, String s2) with two String arguments, Which compares s1 and s2 whether they are equal or not. Question 5:Write a program to overload a function volume to compute the volume of a cube, a sphere and a cuboid. Volume of a cube (VC) = s*s*s Volume of sphere (VS) = 4/3* *r*r*r (where = 3.14) Volume of cuboid (VCD) = l*b*h Question 6:Write a menu driven class to accept a number from the user as a choice. If Choice 1 : Palindrome Word : Accept a word and check whether the given word is Palindrome word or not. A palindrome word which when reversed also same as given word. E.g. MADAM Choice 2 : Accept a sentence as a String and find number of words in it. Question 7:- Define a class employee having the following description: Data Members/Instance Variables: int pan : to store personal account number. String na : to store name of employee. double income : to store annual income of the employee. double tax : to store tax that is to be calculated. Member functions: void Input( ) : Accept and store the pan number, name of employee, income. void Calculate( ) : to calculate tax as per given conditions. Annual Income Tax Rate Up to 100000 No tax. From 100001 150000 10% of income. From 150001 250000 20% of income. From 250001 and above 30% of income. void display( ) : Output all the details. i.e. Employee name, Pan number, income and calculated tax. Question 8:Write a java program to compute Andhra Pradesh State electricity bill for the consumers as per the following tariff. Accept name of the consumer, consumer number and number of units consumed and calculate as following. No of units per month Rate per unit Up to 50 units No charge For next 50 units 1.45p per unit For next 100 units 2.35p per unit For next 100 units 3.85p per unit More than 300 Units 5.25p per unit. However every consumer must pay the minimum service charge of Rs. 125. Question 9:Define a class Taxicharges having the following description: Data Members/Instance Variables: int tano : to store Taxi number. String na : to store name of Passenger who is traveling. int km : to store number of kilometers traveled. Member functions: Taxicharges( ) : A constructor to initialize the above data members. void Input( ) : To accept taxi number, name, kilometers. void Calculate( ) : to calculate taxi charges as per given conditions. No. of Kilometers Travelled Rate per Kilometer 1 < Km <= 6 Km Rs. 10. 6 < Km <= 12 Km Rs. 25. 12 < Km <= 18 Km Rs. 40. > 18 Km Rs. 50. void display( ) : Output all the details. Write a main method to create an object of class and call the above member methods. *******ALL THE BEST*******

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

dimplesatyapravallika chat