Supplementary Summer Examination – 2024 Course: B. Tech. Branch: Computer and Allied Branches Semester: III Subject Code & Name: BTCOC305B Object Oriented Programming in Java Max Marks: 60 Date: 09/07/2024 Duration: 3 Hr. Instructions to the Students: 1. All the questions are compulsory. 2. The level of question/expected answer as per OBE or the Course Outcome (CO) on which the question is based is mentioned in ( ) in front of the question. 3. Use of non-programmable scientific calculators is allowed. 4. Assume suitable data wherever necessary and mention it clearly. (Level/ Marks CO) Q. 1 Solve Any Two of the following. 12 A) What are the features of Java Programming Language? Explain in brief 2/CO1 6 B) Define Class, Method, and Object. Give the syntax to define these in Java. 2/CO1 6 C) Discuss various types of Constructors in Java. 2/CO1 6
Q.2 Solve Any Two of the following. 12
A) Explain a) Conditional Operators b) Bitwise Operators c) Logical Operators in 2/CO2 6 Java B) Discuss the scope of variables with suitable examples. Explain with the example 2/CO2 6 “For..Each” loop statement provided in Java. C) What is a method? Explain with Java syntax how a method is defined. What do 2/CO2 6 you mean by static methods in Java?
Q. 3 Solve Any Two of the following. 12
A) How can we create a single-dimensional array initialized with random values in 2/CO3 6 Java? What do you mean by ragged array? How is it created using Java? Explain with an example. B) i) Write a Java code for binary search searching technique. 3/CO3 6 ii) Discuss the “arraycopy” method of the System class. C) i) Demonstrate with example how we use an array to pass the variable number of 3/CO3 6 parameters to a method. ii) Explain with suitable example how single dimensional arrays are passed in methods?
Q.4 Solve Any Two of the following. 12
A) What is an abstract class in java? What is an interface? List the rules to 2/CO4 6 create an interface in java with example. B) Discuss how various types of inheritance in Java. 2/CO4 6 C) Write a short note on Polymorphism for Java. 2/CO4 6 f Q. 5 Solve Any Two of the following. 12 A) What is an exception? What are the types of exceptions in Java? Describe the 2/CO5 6 try-catch construct B) Discuss throw, throws and finally statements in Java. 2/CO5 6 C) What is package? Write a program to create user defined package in 3/CO5 6 java. *** End ***