Trending ▼   ResFinder  

hardest sample paper for computer !!!

2 pages, 0 questions, 0 questions with responses, 0 total responses,    0    0
Nisarg Pandya
Zydus School for Excellence (ZSE), Vejalpur, Ahmedabad
+Fave Message
 Home > cooldude0000 >

Formatting page ...

Sample Paper -1 Sample Paper 1 Class X Subject COMPUTER APPLICATIONS SECTION A (All Questions are compulsory ) Q.1.a) What do you know about instance variable? [2] b) What does encapsulation lead to? [2] c) What is a Stream? [2] d) What is the difference in the classes String and StringBuffer? [2] e) What is control variable? [2] Q.2.a) Why is a class known as composite data type? [2] b) What is Recursive method? [2] c) What is Function Signature? [2] d) Differentiate a constructor from a destructor ? [2] e) Which unit of a class gets called when the object of the class is created ? [2] Q.3.a) Encapsulation wraps up the attributes and methods of the object comment. [2] b) Write the prototype of the function that returns a double value and takes three double parameters x, y and z as its parameters. [2] c) In the following statements assume a = 50 , b = 10 and c = 20. The statement is c + = ( a>0 && a<=10 ) ? + + a : a / b ; What is the value of c ? [2] d) A method definition is as shown below : int power ( int x , int y ) { int f = 1 ; for ( int i = 1 ; i <= y ; i + + ) f*=i; return ( f ); } Answer the following : What is the term given to the variables x and y? [1] What is the significance of the type int used before the method name power? [1] Name the type of method shown above. [1] In one line state that what the method shown above is computing? [1] i) ii) iii) iv) Q.4.a) Read the following overloaded method prototypes and answer the question that follow : [2] void calculate ( int x , double y ); void calculate ( double x , double y , double z ); i) Write the java statement to invoke the method calculate using actual parameters a=20 , b=45.52 . ii) Write the java prototype to overload the method calculate to return a double result And accepts three double parameters . b) Write the output of the following: [2] int a[ ] = { 5 , 8 , 7 , 3 , 2 }; a[ 1 ] = a[ 3 ] ; a[ 2 ] = a[ 4 ] ; a[ 3 ] = a[ 1 ] + a[ 2 ] ; for ( int i = 0 ; i < 5 ; i + + ) 1 Sample Paper -1 System.out.print( a[ i ] + , ); c) What are wrapper classes ? [2] d) What do you know about visibility control ? [2] e) What is an abstract method ? [2] SECTION B ( Attempt Any FOUR Questions. Each program should be written in such a way that it clearly depicts the logic of the program. This should be achieved by using mnemonic code and comments in the program. Each question carries 15 marks.) Q.5. Binomial co-efficient can be calculated by using the following formula : n! n Cm = ---------------[ where ! sign represents the factorial of a number ] m ! ( n m)! WAP in java to calculate and print the binomial co-efficient of the given expression, taking the value n and m as input . Make use of the function int fact( int k ), which returns the factorial of a number k . Q.6. WAP in Java to create a class Empl for the following specification : Data Members : Emp_No , Name , Basic Salary , DA , HRA , TA , PF , Gross Salary Member Methods : get ( ) : To accept Employee No. , Name and Basic Salary of the employees calcu ( ) : To calculate the Gross Salary (=(Basic Salary + DA + TA + HRA ) PF) based on the following condition: Basic Salary DA(%) TA(%) HRA(%) PF(%) >= 20,000 53 12 10 8 >=10,000 to <20,000 45 10 12 7.5 < 10,000 40 8 14 7 display ( ) : To display the following data in given format : EMPLOYEE No. NAME GROSS SALARY PF -------------Write a main method to create the object of the above class and call the above method to calculate and print the Employee No. , Name , Gross Salary and PF of an employee. Q.7. A man has writer a statement as MY NAME IS AMAL KUMAR GHOSH AGE IS 35 YEARS . Later on he realized that he had declared the name Instead of BIMAL and the age 35 instead of 45 . WAP in java to correct the name and age in the above statement and the output as MY NAME IS BIMAL KUMAR GHOSH AND MY AGE IS AND MY as AMAL display 45 YEARS . Q.8. Write a menu driven program in java to perform the following ( using switch case ): i) to print the value of S where S = 1/1! + ( 1 + 2 )/( 1! + 2! ) + ( 1 + 2 + 3 ) / ( 1! + 2! + 3! ) + . upto n terms . ii) to print the value of S where S = 1n + 2(n-1) + ... . .. + (n-1)2 + n1 Q.9. WAP in java to accept the NAME and TOTAL MARKS obtained in an exam of a class having N number of students and display the NAME and TOTAL MARKS of the students according to the rank 1st , 2nd and 3rd. ================= ALL THE BEST ================= 2

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

cooldude0000 chat