RED Sr. Sec. School, Chhuchhakwas

Holidays Home Work(2018-19)

Class : XII Commerce Sub : Informatics Practices

  1. Differentiate between Star and Ring Topology?
  2. Differentiate between Snooping and Eavesdropping?
  3. What is use of Repeater in a Network? How is it different from Hub?
  4. Write some advantages and disadvantages of the following :

  1. Optical Fibers
  2. Coaxial Cable
  3. Radio Wave
  4. Micro Wave

  1. What do you mean by Standards? How many types of Standards? Explain them.
  2. What is the significance of Unicode in terms of Indian Language Computing?
  3. Name three Indian scripts included in UNICODE.
  4. Name one example of Proprietary, Open Source and Shareware Software.
  5. Differentiate between OTF and TTF.
  6. Compare and contrast:

Free and Open Source Software

OSS and FLOSS

Proprietary and Free Software

Freeware and Shareware

Freeware and Free Software

  1. What is ODF?
  2. What are following ODF file extensions meant for:

odtodsodpodgodb

  1. Differentiate between Static and Dynamic font.
  2. Differentiate between Implicit and explicit type conversion.
  3. Predict the output/error in the following code:

int x=20;

while(1)

{

System.out.println(“value after increment is”+ (x+1));

}

  1. What will be the output of following code:

int f=1,i=2;

while(++i<5)

f*=i;

System.out.println(f);

  1. What will be the output of following code:

int f=1,i=2;

do

{

f*=i;

}while(++i<5)

System.out.println(f);

  1. What will be the output of following code:

int i,j,k;

for(i=1;i<=4;++i)

{

for(k=1,j=i;k<=I;k++,j+=2)

System.out.print(“ ”+j);

System.out.println();

}

  1. What will be the output of following code:

int x=10,y=15;

System.out.println(x++ +” , “ + y--);

System.out.println(--x +” , “ + ++y);

  1. Convert the following if-else into switch statement

if(ch==’a’ || ch==’e’ || ch==’i’ || ch==’o’ ||ch==’u’)

System.out.println(“Lowercase vowel”);

else if(ch==’A’ || ch==’E’ || ch==’I’ || ch==’O’ ||ch==’U’)

System.out.println(“Uppercase vowel”);

else

System.out.println(“Not a vowel”;

  1. Convert the following switch into if-else

System.out.println(“June Month 2016”);

switch(ch)

{

case 1:

case 2:

case 3: System.out.println(“Hello Students-Enjoy Holidays”);

break;

case 9:

case 10: System.out.println(“Hello students-Come to Summer Camp”);

break;

case 11:

case 12: System.out.println(“Be Happy-Come to School upto 11 June & do your homework in holidays”);

break;

default: System.out.println(“Hello students- Do your Home Work”);

}

  1. Convert the following for loop into while and do-while loop:

int i=5;

for( ; i<=10; i++)

System.out.println(i);

  1. 1) How many times the following loop will be executed:

2) How many times condition will be tested

x=5;

y=50;

while(x<=y)

{

x=y/x;

}

  1. What is fall through? What is the use of break in a switch statement?
  2. Define a class library in Java with the following specification:

Private Member:

bookidinteger type

authorstringtype

namestring type

pricefloat type

Public member:

A function input() which allows user to initialize values of all the data members.

A function output( ) to display the content of all the data member.

  1. Define a class hostel in Java with the following specification:

Private Member:

Admnointeger type

Namestringtype

Addressstring type

phonenointeger type

Public member:

A function read() which allows user to initialize values of all the data members.

A function show( ) to display the content of all the data member.

  1. Define a library. Give examples.
  2. Name the commonly used packages in java.
  3. In one word, what is the difference between String and StringBuffer..
  4. Which package is by default imported in every java program.
  5. Math library of java is available under………… package.
  6. Predefined classes are available in the form of ------.
  7. Name the package you need to import for performing input and output.
  8. Write the statement to import “JOptionPane” in your program.
  9. What does round() return if a negative float value is passed to it.
  10. What do pow() and round() functions return if an argument that is not a number (NaN) is passed to them.
  11. Name the classes used in java to work with character data.
  12. Differentiate between length() and capacity() functions.
  13. Name at least two functions of following:

(1) System (2) Math(3) Integer (4) String (5) StringBuffer

  1. Write the statement to import the class ”abc” of package ”first” in your program.
  2. Write the statement to import all the classes of package ”first” in your program.
  3. What will be the value of len, str1 and str2 after executing following code.

Initially str1=”Computer” and str2=”lab” .

str2=str1.concat(str2)

str1=str1.toUpperCase()

str1=str2.replace(“lab”, “center”)

len=str2.length();

  1. What will be the value of a if

(i) a = Math.pow(2,5)(ii) a = Math.pow(5,2)

(iii) a = Math.sqrt(25)(iv) a = ”Computer Lab”.length()

(v) a= Math.round(12.5)(vi) a=Math.round(-12.5)

  1. What will be the output of following:

String message=”Best of Luck”;

System.out.println(message.length( ) - 10);

  1. What will be the contents of text field “tf1” after executing following code:

String msg=”Happy Journey”;

tf1.setText(Integer.toString(msg.length()+20));

  1. What will be the contents of text area “ta1” after executing following code:

String str=”RED Sr Sec School Jhajjar”;

ta1.setText(“Hello Students\n”);

ta1.append(str.replace(“Jhajjar”,”Chhuchhakwas”));

  1. What will be the contents of text1 and text2 after executing following code:

String text1,text2;

text1=”Rama”;

text2=”Sidhiwara ”

text1=text2.concat(text1);

System.out.println(text1);

System.out.println(text2);

  1. What will be the output of the following code.

String str = “Hello Good Morning”;

char c = str.charAt(6);

int pos1 = str.indexOf(“o”);

int pos2 = str.lastIndexOf(“o”);

int pos3 = str.substring(pos1+2).indexOf(“o”);

System.out.println(“ C = “+c +”\nPos1 = “ +pos1 +”\nPos2 “+pos2+ “\nPos3 “+pos3);

  1. Find the output of the given code.

String Name1 = “School”;

String Name2 =”school”;

System.out.println(Name1.compareTo(Name2));

System.out.println(Name1.compareToIgnoreCase(Name2));

System.out.println(Name1.equals(Name2));

System.out.println(Name1.equalsIgnoreCase(Name2));

  1. What will be the contents of jTextField1 and jTextField2 after executing the following code:

String s = “Singh and King Company” ;

jTextField1.setText ( s.Length( ) + “ “ );

jTextField2.setText ( Math.pow(5,3) + “ “);