Friday, December 18, 2015

BASIC JAVA,University Of Pune Question Paper,P. G. D. C. A. (Semester - II),2010 Question Paper,

BASIC JAVA,University Of Pune Question Paper,P. G. D. C. A. (Semester - II),2010 Question Paper,
University Of Pune Question Paper
P. G. D. C. A. (Semester - II) Examination - 2010
BASIC JAVA
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question No. 1 is compulsory.
(2) Solve any four from the remaining.
Q.1) (A) Solve the following : [06]
(a) Select true statements :
(i) Object of interface can be created using new key
word.
(ii) All variables in interface are static and public.
(iii) In interface method implementation of any of the
methods can be declared.
(iv) All methods in interface are abstract.
(b) Select true statements :
(i) Main( ) method can be overloaded.
(ii) Constructor returns nothing.
(iii) New key word is used to call constructor.
(iv) Constructor can be declared as private.
(c) Select true statements :
(i) Overloaded methods have same signature.
(ii) Overridden methods have same signature.
(iii) Overloaded methods are declared in same class.
(iv) Overridden methods are declared in same class.
(B) Write short notes : (Any Two) [08]
(a) Thread Life Cycle
(b) Wrapper Classes
(c) Vector
(d) Data types in Java
Q.2) Create Animal as an abstract class with eat( ), grow( ) as abstract
methods. Create abstract class Bird as subclass of Animal with fly( )
as abstract method. Then create concrete classes Parrot, Sparrow
which are Birds. [14]
Q.3) Write an awt application which will have a list, a text field and a
button with caption ‘Add’. When Add button is clicked, contents of
text field should be added to list. [14]
Q.4) Write a threaded application which will add 1 to the caption of button
after every second. Initially Button has caption “1”. [14]
Q.5) Write an application which will accept a number from command line.
If the given number is odd number, then throw “oddNumber” user
defined exception. [14]
Q.6) Write an application which will accept a file name using command
line. Then show odd positioned lines of that file. Handle exceptions. [14]

Sunday, December 13, 2015

M. C. M. (Semester - II),University Of Pune Question Paper,2010 Question Paper,BASIC JAVA

M. C. M. (Semester - II),University Of Pune Question Paper,2010 Question Paper,BASIC JAVA
University Of Pune Question Paper
M. C. M. (Semester - II) Examination - 2010
BASIC JAVA
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Q. Nos. 1 and 8 are compulsory.
(2) Solve any five from the remaining.
Q.1) Justify your answer : [12]
(a) Select correct options :
(i) Interface must have at least one method.
(ii) Interface can have only abstract methods.
(iii) Interface can have constants.
(iv) Interface can have hierarchy.
(b) Select correct options :
Interface MyConstants
{ Int r = 42;
Int s = 69;
// insert code
}
Select which of the following codes can be inserted at insert
code comment line which will not generate errors :
(i) Final double c = 2*Math.PI*r;
(ii) int area = r*s;
(iii) int result = result + r + s;
(iv) public static Main = 20;
(v) protected int code = 311;
[3877]-204 1 P.T.O.
(c) What will be the output ?
public class Super {
public static String greet(){
return “Pune”;
}//greet
 public String getName(){
return “University”;
}//getName
}//super
class Sub extends Super{
public static String greet(){
return “Banaras”;
}//greet
public String getName(){
return “Vidyalaya”;
}//getName
}//sub
public class Demo{
public static void main(String[] args)
{ Super s = new Sub();
System.out.print\n(s.greet() + “ ” + s.getName());
}
}
(d) When thread will die ? (Select correct answer)
(i) Execution of run() method ends
(ii) Sleep () is called
(iii) Wait () is called
(iv) Execution of thread’s constructor ends
[3877]-204 2 Contd.
Q.2) Write INTS class which has 2 integers as instance variables, print()
method, compare () method which will compare 2 objects, overloaded
constructors. Create 3 different objects. [10]
Q.3) Write an awt application which will accept rollno, name and marks
of the student in three text fields. When add button is clicked the
contents of text fields should be added in list. [10]
Q.4) Write a threaded applet which will display circle with different colours.
Colour will change after 1 second. Accept radius of the circle as
parameter. [10]
Q.5) Write an application which will accept 5 strings from command line.
If any of the strings is palindrome then throw “GotPalindrom” user
defined exception. [10]
Q.6) Write an application which will accept 2 file names using BufferedReader.
Then swap contents of those files. Do necessary validations. [10]
Q.7) Write code snippet : [10]
(a) Set layout of frame as grid with 4 columns and 5 rows.
(b) Anonymous class to close Window.
(c) Find first occurrence of character “U” in the string “Pune
University”.
(d) Call sleep method for 100 milliseconds.
(e) Check whether file “abc.txt” is readable or not.
Q.8) Write short notes : (Any Two) [08]
(a) Thread Synchronisation
(b) Access Modifiers
(c) Hash Table

Saturday, November 28, 2015

2012 Question Paper,M. C. M. (Semester - II),University Of Pune Question Paper,BASIC JAVA

2012 Question Paper,M. C. M. (Semester - II),University Of Pune Question Paper,BASIC JAVA
University Of Pune Question Paper
M. C. M. (Semester - II) Examination - 2012
BASIC JAVA
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question Nos. 1 and 7 are compulsory.
(2) Solve any 3 from questions 2 to 6.
Q.1) Solve the following : [15]
(a) Which are the Life Cycle Methods of an Applet ?
(b) What is Inner Class ?
(c) What are Compilation Errors and Run-time Exception ?
(d) List Methods of File Class.
(e) Write Anonymous Class for Window Closing Event.
Q.2) Write a program which will read the file byte by byte and convert
into uppercase and copy it into another file. [15]
Q.3) Write a program that accepts two numbers and a operator like
(+, –, *, /) as command line arguments and perform the appropriate
operation indicated by the operator.
If user enters any other character, fire user-defined exception with
appropriate message “Invalid Character Exception”. [15]
OR
Q.3) Write an application to define an interface ‘CalculateResult’ with
methods CalculateTotal(), CalculatePercentage() and CalculateGrade().
Write student class with implementation of ‘CalculateResult’. Create
student object and display total marks, percentage and grade of student. [15]
Q.4) Write an application that will create the following threads : [15]
(a) To display the following sequense :
(1, 4, 9, 16, 25)
(b) The series a, c, e, g. .... z
Q.5) Write an AWT Application to draw a circle. Accept the necessary
parameters for drawing a circle and a colour to fill the circle. [15]
Q.6) Define Class Employee. Define another two subclasses :
(a) Temporary Employee Class
(b) Permanent Employee Class
(i) Calculate salary for temporary employee depending upon no. of
hours per month and overtime hours.
(ii) Calculate salary for permanent employee depending upon no. of
days per month.
(iii) Override calcsal() method
(iv) Write appropriate constructors. [15]
Q.7) Write short notes : (Any Two) [10]
(a) Abstract Class
(b) String Buffer Class
(c) Thread Class
[

Search Everything Here