हिंदी

(English Medium) ICSE Class 10 - CISCE Question Bank Solutions

Advertisements
विषयों
अध्याय
विषयों
मुख्य विषय
अध्याय

Please select a subject first

Advertisements
Advertisements
< prev  7861 to 7880 of 19036  next > 

Design a class to overload a function area( ) as follows:
(i) double area (double a, double b, double c) with three double arguments, returns the area of a scalene triangle using the formula:

area = `sqrt ("s" ("s" - "a")("s" - "b")("s" - "c"))  "2ab"`

where `"s" = ("a" + "b" + "c")/2`

(ii) double area (int a, int b, int height) with three integer arguments, returns the area of a trapezium using the formula:

area = `1/2` height (a+b)

(iii) double area (double diagonal 1, double diagonal 2) with two double arguments, returns the area of a rhombus using the formula :

area = `1/2` (diagonal 1 × diagonal 2)

[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Give the output of the following code.

String A = "26.0", B= "74.0";

double C = Double.parseDouble(A);

double D = Double.parseDouble(B);

System.out.println((C+D));

[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Advertisements

A mechanism where one class acquires the properties of another class:

[1] Introduction to Object Oriented Programming Concepts
Chapter: [1] Introduction to Object Oriented Programming Concepts
Concept: undefined >> undefined

Predict the output of the following code snippet: String P = "20", Q = "22";

int a = Integer.parseInt(P);

int b = Integer.value0f(Q);

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

[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Give the output of the following Character class method:

Character.toUpperCase('a')
[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Give the output of the following Character class

method:Character.isLetterOrDigit('W')

[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Consider the given array and answer the question given below:

int x[ ] {4; 7,9,66,72,0,16);

What is the length of the array?

[3] Arrays (Single Dimensional and Double Dimensional)
Chapter: [3] Arrays (Single Dimensional and Double Dimensional)
Concept: undefined >> undefined

Consider the given array and answer the question given below:

int x[ ] {4; 7,9,66,72,0,16);

What is the value in x[4]?

[3] Arrays (Single Dimensional and Double Dimensional)
Chapter: [3] Arrays (Single Dimensional and Double Dimensional)
Concept: undefined >> undefined

Write the value of n after execution:

char ch = 'd';
int n = ch+5;
[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Define a class to accept 10 characters from a user. Using bubble sort technique arrange them in ascending order. Display the sorted array and original array.

[3] Arrays (Single Dimensional and Double Dimensional)
Chapter: [3] Arrays (Single Dimensional and Double Dimensional)
Concept: undefined >> undefined

Define a class to accept values into an array of double data type of size 20. Accept a double value from user and search in the array using linear search method. If value is found display message "Found" with its potiition where it is present in the array. Otherwise display message "not found".

[3] Arrays (Single Dimensional and Double Dimensional)
Chapter: [3] Arrays (Single Dimensional and Double Dimensional)
Concept: undefined >> undefined

Which of the following is an escape sequence character in Java?

[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

What is the method to check whether a character is a letter or digit?

[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

What is the output of the Java code given below?

String color [ J = {"Blue", "Red", "Violet"}; System.out.println(color[2].length();

[5.1] Introduction to Java
Chapter: [5.1] Introduction to Java
Concept: undefined >> undefined

Rewrite the following do while program segment using for:

x = 10; y = 20;
do
{
   x++;
   y++;
}while (x<=20);
System.out.println(x*y);
[5.1] Introduction to Java
Chapter: [5.1] Introduction to Java
Concept: undefined >> undefined

Consider the given program and answer the questions given below:

class temp
      {
      int a;
      temp()
      {
      a=10
      }
      temp(int z)
      a=z;
      }
      void print()
      {
      System.out.println(a);
      }
      void main()
      {
      temp t = new temp();
      temp x = new temp(30);
      t.print();
      x.print();
      }
      }
  
  1. What concept of OOPs is depicted in the above program with two constructors?
  2. What is the output of the method main()?
[1] Introduction to Object Oriented Programming Concepts
Chapter: [1] Introduction to Object Oriented Programming Concepts
Concept: undefined >> undefined

The size of '\n' is ______.

[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

The method to convert a lowercase character to uppercase is ______.

[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

Predict the output of the following code snippet:

char ch='B';
char chr=Character.toLowerCase(ch);
int n=(int)chr-10;
System.out.println((char)n+"\t"+chr);
[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined

A student is trying to convert the string present in x to a numerical value, so that he can find the square root of the converted value, However the code has an error. Name the error (syntax/logical/runtime). Correct the code so that it compiles and runs correctly.

String x="25";
int y=Double.parseDouble(x);
double r=Math.sqrt(y);
System.out.println(r);
[2] Library Classes
Chapter: [2] Library Classes
Concept: undefined >> undefined
< prev  7861 to 7880 of 19036  next > 
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×