Department of MCA Assignment Questions MC7305 / Internet Programming II MCA Unit II PART A
1. Distinguish between a class and Interface.
2. Define class. Write the structure of a class. 3. What is the use of Throw class? Discuss with an example? 4. What is the difference between >>= and >>>= operators? 5. Give an example for dynamic initialization of a variable? 6. List out the control structures available in Java. 7. What is the main use of Java package. Define Exception. 8. Why Java is called platform independent and architectural neutral?
PART B
1. Write Java program to perform the following:
(i) Check whether the given matrix is upper triangular or not. (8) (ii) Find the sum of the diagonal elements. (8) 2. (i) Illustrate with an example how exception handling is done in Java. (8) (ii) Demonstrate the if-else ladder using a sample Java code. (8) 3. (i) Write short notes on arithmetic assignment and modulus operators supported in Java with examples. (8) (ii) With an example, explain how a divide by zero condition is handled in Java. (8) 4. (i) What is a package? List any three packages and its uses. (6) (ii) Write an interface for Library renewal and availability. Implement it for the operations of a Library. (10)