Wednesday, December 16, 2015

University Of Pune Question Paper,203-C : Computer Specialization OOP CONCEPT AND BASIC JAVA,2010 Question Paper,M.M.S./M.B.S. (Semester – II)

University Of Pune Question Paper
M.M.S./M.B.S. (Semester – II) Examination, 2010
OOP CONCEPT AND BASIC JAVA
 (2008 Pattern) (New)
203-C : Computer Specialization
Time: 3 Hours Max. Marks: 70
 Note : Question 1 is compulsory. Solve any five out of remaining.
1. A) Trace the output justify the answer : 15
a) Class Base {
public final void amethod ()
{
System.out.println(“A Method ”);
}}
public class Fin extends Base {
public static void main (String arg[ ])
{Base b = new Base ();
b.amethod()
}}
b) // File p1.java
package myPackage;
class P1
{
void afancyMethod()
{
System.out.println(“What a fancy method”);
}
}
// File P2.java
Public class P2 extends P1
{ public static void main(String ar[ ])
{
P2 p2 = new P2();
p2.newFancyMethod();
}
}
c) Which of the following correct syntax for suggesting that the JVM per
forms garbage collection
a) Syste,.free();
b) System.setGarbageCollection ();
c) System.out.gc();
d) System.gc();
d) Public class prg {
Static int cal(int x, int y) {
return(x + 2 * y);
}
public static void main(String a[ ]) {
int x= 0, y = 2;
System.out.println (cal (x +=5, y = x = 9));
}
}
e) Which of the following will output – 4.0 ?
A) System.out.println(Math.floor(–4.7));
B) System.out.println(Math.round(–4.7));
C) System.out.println(Math.ceil(–4.7));
D) System.out.println(Math.Min(–4.7));
1. B) What is polymorphism ? How Java supports it ? 5
2. Write an application that will accept addresses of 10 friends in array of objects.
Fire an exception if pin code supplied is empty or is not numeric design suitable
class to do the same. 10
3. Write an applet application to accept two digit number in a text field. Take another
text field and “CONVERT” button on GUI. When user clicks convert button,
the entered number is shown in another text field in words i.e. if number is 12
other text field will show Twelve or if number is 35 the other text field will show
Thirty Five. 10
4. Write application to accept name of file on command line. Display number of
words and number of lines present in the file. 10
5. What is exception ? Explain with example. 10
6. Create multi threaded application that will perform following tasks 10
– Accept user name and find length of it.
– Accept string find number of vowels in it.
7. Write notes on (any 2) : 10
1) Vector class
2) Differentiate between class and interface
3) Access modifiers.
______________

Share This
Previous Post
Next Post

B.E Civil Engineer Graduated from Government College of Engineering Tirunelveli in the year 2016. She has developed this website for the welfare of students community not only for students under Anna University Chennai, but for all universities located in India. That's why her website is named as www.IndianUniversityQuestionPapers.com . If you don't find any study materials that you are looking for, you may intimate her through contact page of this website to know her so that it will be useful for providing them as early as possible. You can also share your own study materials and it can be published in this website after verification and reviewing. Thank you!

0 comments:

Pen down your valuable important comments below

Search Everything Here