Skip to main content

Informatics practice IP Sample question paper 2012 (no SQL)

Section – A
Q.1. Find the output of the following:-
(a).class MAIN{
void calculate( int a, int b)
{  show( a+b);
System.out.print(“Calculating”)   }
public MAIN( int x, int y)
{calculate( x,y);
System.out.print(“ In Initialize “ + x+” & “ +y +”Place”); }
void show( int x)
{System.out.print(I am Printing: ” + x);}
Public static void main(String args[])
{MAIN ob=new Mani(10,-90);
}
}
(b). i. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{ display(11, 19 );
}
void display(int i, int j ){
System.out.println(i>>j);
System.out.println(i<<j);
}
ii. private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{ manipulate(11 ); }
void manipulate(int i){
int n=i*5;
System.out.println(“i= ” + i%i++ );
i%=--n+1;
System.out.println(“n= ” + n );
}

Q2. Find Errors and Rewrite correct code the following program code:-
(a) .public class MAINPRO {
int a,b;
public void MAINPRO(int x, int y)
{ x=100;
y=200; }
public static void main(String args[])
{ MAINPRO(120, 50) obj = new MAINPRO(10);
a=20;
b=30; }
}

(c). Write a Java Class ABC and define two class methods like “swapByVal()” for swapping two number by value , “swapByRef()” for swapping variable value by using reference parameter. And also display swaped value on screen, these method call in main () method.

(d). Write NetBean IDE code to display following output: 1! + 2! + 3! + 4! + ……… + N!

Section – B
Q4. Differentiate with example :-
(a) Testing & Debugging
(b) Try & Catch and Throws.

Q5. Answer the following questions
(a). What is Error? Explain different type of errors.

(b) Design an application having an interface like:




Implement functionality by writing methods with passing the argument of three textboxes in, clacSum(), calcAvg() & calcMax(). Invoke these methods from buttons event handlers.

Q6. Answer the following questions
I. Write down Problem solving Methodology and Techniques
II. Difference between Primitive data type and User define data type.

Q7. Answer the following questions [any two ]
(a). Write a program & design IDE form to define two method calcCI() & calcSI() to pass Principal Amount & Time as a argument and return Simple Interest & Compound Interest respectively as per following criteria :-


Amount Time Rate
1-5000 0-5 10%
5000-10000 6-8 15%
10000- 20000 9-12 20%
20000-50000 13-20 25%
>50000 >20 30%

(b). Write Java method and integer number of series terms as a argument to print following series. 1, 2, 4, 8, 16, 32,………..

c). Write a Java code to display following Code:-
0
0 2
0 2 4
0 2 4 6
0 2 4 6 8

Popular posts from this blog

10 ways to kill your annoying sister!

 Do you have a sibling ? Is she annoying ? Don't sweat follow our steps and you could surely get rid  of her. This is a Global problem and been a sincere citizen I thought maybe  I should guide my fellow mates the path to a solution to this crisis :P. I would recommend you to watch Saw series totally before planning your way.   #1  Buy her a new vehicle ! Wait we are not been nice... She is a women she will find a way to kill herself or atleast get in jail, well both solves our problem. #2  Every girl is scared of cockroaches , spider and lizards . So think something creative and finish that nuisance. #3  Now I will tell you how to make a weapon. {Shit just got real } we are goin to make a BLOW GUN. Take a cylindrical thing anything with a hollow space and put empty pen refills inside it ,and blow.  If the nemesis is strong keep 10 of them handy . Remember this point ---  shot between the eyes only . #4  This one is brutal , first slit all her

[NSFW] Unsettling photos with back stories. | No Sleep

  A lot of pictures out in the world are creepy. Some are bizarre. Especially if you know the backstories to them. Note: if you are faint of heart, or have difficulty going to sleep after watching gore, don’t read this. 1. The War Photo No One Would Publish   The Iraqi soldier died attempting to pull himself up over the dashboard of his truck. The flames engulfed his vehicle and incinerated his body, turning him to dusty ash and blackened bone. In a photograph taken soon afterward, the soldier’s hand reaches out of the shattered windshield, which frames his face and chest. The colors and textures of his hand and shoulders look like those of the scorched and rusted metal around him. Fire has destroyed most of his features, leaving behind a skeletal face, fixed in a final rictus. He stares without eyes. You can still see the grimace on his face.

7 Things you hate about your Kaam Wali Bai!

bai noun a women who helps in chores in a household “Kal kyu nahi aayi bai ?” Synonyms: Kaamwalibai The most important person of any Indian household is “ Bai “, work all day long to keep your house in shape. They become part of our families and do their jobs happily, but we all have beared the wrath of our bai s. There anger could even take a Consulate down! So here is a list of 7 things you hate about your #KaamwaliBai ! 1. Lying and skipping work       we have heard it millions of time , memsaab aaj mere ghar mein kaam hai main nahi aa payegi. 2. watching daily soap with your mom      My Bai (who is Marathi) even watched a Bengali daily Soap with my Mum. 3.  Stealing spoon and forks 4. Sweeping Dirt under the Bed . 5. Stomping in your room like FBI. 6.Making food extra spicy ! 7. Acting like the owner of the house! Why u no follow us on facebook?                                                       Or if you dare, g