0% found this document useful (0 votes)
11 views4 pages

Class 10 100 Marks Question

Uploaded by

SUBHANKAR SAHA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Class 10 100 Marks Question

Uploaded by

SUBHANKAR SAHA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

NAME : ________________________________________________________ Time : 2HR

GROUP A: 40 Marks

Answer all questions from Group A: [20x2=40]

1. Name any two basic principles of Object-oriented Programming.


2. Write a difference between unary and binary operator.
3. Name the keyword which:

1. indicates that a method has no return type.

2. makes the variable as a class variable

4. Write the memory capacity (storage size) of short and float data type in bytes.
5. Identify and name the following tokens:

1. public

2. 'a'

3. ==

4. { }

6. Differentiate between if else if and switch-case statements


7. Give the output of the following code:

String P = "20", Q ="19";

int a = Integer.parseInt(P);

int b = Integer.valueOf(Q);

System.out.println(a+""+b);

8. What are the various types of errors in Java?


9. State the data type and value of res after the following is executed:

char ch = '9';

res= Character.isDigit(ch);

10. What is the difference between the linear search and the binary search technique?
11. Write a Java expression for the following:
|x2 + 2xy|
12. Write the return data type of the following functions:

1. startsWith()

2. random()

13. If the value of basic=1500, what will be the value of tax after the following statement is
executed?
tax = basic > 1200 ? 200 :100;
14. Give the output of following code and mention how many
times the loop will execute?

int i;

for( i=5; i>=1; i--)

if(i%2 == 1)

continue;

System.out.print(i+" ");

}
15. State a difference between call by value and call by
reference.
16. Give the output of the following:
Math.sqrt(Math.max(9,16))
17. Write the output for the following:

String s1 = "phoenix"; String s2 ="island";

System.out.println(s1.substring(0).concat(s2.substring(
2)));

System.out.println(s2.toUpperCase());
18. Evaluate the following expression if the value of x=2,
y=3 and z=1.

v=x + --z + y++ + y

19. String x[] = {"Artificial intelligence", "IOT",


"Machine learning", "Big data"};

Give the output of the following statements:

1. System.out.println(x[3]);

2. System.out.println(x.length);

20. What is meant by a package? Give an example.


GROUP B: 60 Marks

Answer any 4 questions from Group B [4x15=60]

1. Design a class name ShowRoom with the following description:

Instance variables / Data members:


String name — To store the name of the customer
long mobno — To store the mobile number of the customer
double cost — To store the cost of the items purchased
double dis — To store the discount amount
double amount — To store the amount to be paid after discount

Member methods:
ShowRoom() — default constructor to initialize data members
void input() — To input customer name, mobile number, cost
void calculate() — To calculate discount on the cost of purchased items, based on following criteria

Cost Discount (in percentage)

Less than or equal to ₹10000 5%

More than ₹10000 and less than or equal to ₹20000 10%

More than ₹20000 and less than or equal to ₹35000 15%

More than ₹35000 20%

void display() — To display customer name, mobile number, amount to be paid after discount.

Write a main method to create an object of the class and call the above member methods.

2. Using the switch-case statement, write a menu driven program to do the following:

(a) To generate and print Letters from A to Z and their Unicode

Letters Unicode

A 65

B 66

. .

. .

. .

Z 90
(b) Display the following pattern using iteration (looping) statement:

1
12
123
1234
12345

3. Write a program to input 15 integer elements in an array and sort them in ascending order using
the bubble sort technique.

4. Design a class to overload a function series( ) as follows:

(a) void series (int x, int n) – To display the sum of the series given below:

x1 + x2 + x3 + .......... xn terms

(b) void series (int p) – To display the following series:

0, 7, 26, 63 .......... p terms

(c) void series () – To display the sum of the series given below:

1/2 + 1/3 + 1/4 + .......... 1/10

5. Write a program to input a sentence and convert it into uppercase and count and display the
total number of words starting with a letter 'A'.

Example:

Sample Input: ADVANCEMENT AND APPLICATION OF INFORMATION TECHNOLOGY ARE EVER


CHANGING.

Sample Output: Total number of words starting with letter 'A' = 4

6. A tech number has even number of digits. If the number is split in two equal halves, then the
square of sum of these halves is equal to the number itself. Write a program to generate and print
all four digits tech numbers.

Example:

Consider the number 3025

Square of sum of the halves of 3025 = (30 + 25)2


= (55)2
= 3025 is a tech number.

You might also like