June 2003
CS-74: INTRODUCTION TO INTERNET PROGRAMMING
(JAVA, ACTIVE X)
Time: 3 hours Maximum Marks: 75
Note: Question 1 is compulsory. Attempt any three from the rest.
1. (i) Write a Java program to calculate Fibonancci series recursively. [10]
(ii) What is a Java virtual machine? [05]
(iii) What is the difference between keyword throw and throws? [05]
(iv) What is the difference between an application and an applet? [05]
(v) List all primitive data types, size and range of values they accept. [05]
2. Describe the following terms:
- Multithreading
- Distributed
- Object oriented
- The Modifier abstract
- Constructors
- Secure
- Interface [15]
3. Differentiate between the following: [15]
(i) Method overloading and Overriding a method
(ii) Interpreter and Compile
(iii) Class and object
(iv) This and Super
(v) Unicode and ASCII code
4. (i) Describe the following classes: [09]
- Exception class
- Runtime exception class
- I/O exception class
(ii) Write an example of user defined exception. [06]
5. (i) Write an example of user defined exception. [10]
(ii) List the modifiers and describe their purpose. [05]
5. (I) Implement a student class. A student has a name, stipend, and enrolment number. Write a default constructor and a constructor with two parameters (name and enrolment number) and two methods.
(a) To return the name and enrolment number.
(b) A method that increases the student’s stipend.
Write a small program that tests your class. [10]
(ii) State true or false with reasons: [05]
- Every element in the array has the same type.
- Array size is fixed after it is created.
- Java supports multiple inheritance
- Every Java class has a dafault constructor
- The static keyword is used to access a program code without instantiating the class to which that code belongs.
No comments:
Post a Comment