We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
15 Explain inheritance in Java and list the different types
Hindusthan College of Engineering and Technology U CO3 14
An Autonomous Institution, Approved by AICTE, New Delhi Affiliated to Anna University Accredited by NBA (AERO, AUTO, CIVIL, of inheritance. Provide examples. CSE, ECE, EEE, IT, MECH, MECHATRONICS) Accredited by NAAC with ‘A++’ Grade| An ISO Certified Institution OR Valley Campus, Pollachi Highway, Coimbatore 641032. 16 Explain the concept of method overriding in Java with AUTONOMOUS UG / PG - DEGREE an example. How does it differ from method U CO3 14 EXAMINATIONS overloading? CONTINUOUS INTERNAL ASSESSMENT – II 17 Illustrate a Java program that reads input from the Regulation 2021 console, writes output to a file, and handles any BRANCH CSE SEMESTER III U CO4 14 potential exceptions. Provide detailed explanations of Course Code & Name 22HE3072 - FUNDAMENTALS OF JAVA Academic year 2024-25 PROGRAMMING the code. Date and Session 13/11/2024 FN QP Set A OR PART A (Answer All Questions) (10 X 2 = 20) BTL COs Marks 18 Summarize the fundamentals of exception handling in Java. 1. What does the public static void main(String[] args) method What are the key components involved in handling U CO4 14 R CO1 2 exceptions? signify in Java? 2. Compare inheritance and polymorphism in terms of their U CO1 2 19 Explain the event handling mechanism in AWT. How use in Java. 3. What is an object in Java? R CO2 2 does it differ from other event handling methods in U CO5 14 4. How do constructors differ from regular methods in U 2 Java? CO2 Java? OR 5. What is an abstract class in Java? R CO3 2 20 Explain applets in Java. Describe the lifecycle of an 6. U CO5 14 Explain hierarchical inheritance with an example. U CO3 2 applet with examples. 7. List the key components of Java's exception handlingR 2 PART – C (1 X 10 = 10) CO4 mechanism. (Questions must be from Higher Order Thinking – Apply, Analyze ) 8. What is the finally block used for in exception R 2 CO4 handling? 21a) Create a class Student with fields for name, roll number, and 9. Explain simple Java applet code that displays "Hello, R 2 marks. Implement methods to input data, display data, and CO5 A CO4 10 World!" calculate the average marks of the student. Create objects of 10. Define the Thread class in Java. U CO5 2 the Student class and demonstrate these methods. PART B (Answer All Questions) ( 5 X 14 = 70) OR 11 Explain Object-Oriented Programming (OOP) key principles 21b) Create a base class Employee with fields for name and salary. U CO1 14 with examples. Derive two subclasses Manager and Developer that add specific OR fields like department for Manager and programming LanguageA CO4 10 Explain a Java program that demonstrates inheritance and for Developer. Implement methods to display the details of each 12 U CO1 14 polymorphism. Provide detailed code and explanations. type of employee.
13 Explain how arrays and methods are used in Java to
U CO2 14 solve problems. Provide examples. OR Summarize the main features of Java. How do these Course Coordinator Head of the Department 14 U CO2 14 features make Java a robust programming language? problems. Provide examples. Hindusthan College of Engineering and Technology An Autonomous Institution, Approved by AICTE, New Delhi Affiliated to Anna University Accredited by NBA (AERO, AUTO, CIVIL, CSE, ECE, EEE, IT, MECH, MECHATRONICS) Accredited by NAAC with ‘A++’ Grade| An ISO Certified Institution 15 Explain the concept of method overriding in Java with U CO3 14 Valley Campus, Pollachi Highway, Coimbatore 641032. an example. How does it differ from method UTONOMOUS UG / PG - DEGREE overloading? EXAMINATIONS OR 16 Explain inheritance in Java and list the different types ofU CO3 14 CONTINUOUS INTERNAL ASSESSMENT – I inheritance. Provide examples. Regulation 2021 BRANCH CSE SEMESTER III 17 Summarize the fundamentals of exception handling in Java. U CO4 14 Course Code & Name 22HE3072 - FUNDAMENTALS OF JAVA Academic year 2024-25 PROGRAMMING What are the key components involved in handling Date and Session QP Set B exceptions? PART A (Answer All Questions) (10 X 2 = 20) BTL COs Marks OR 18 Illustrate a Java program that reads input from the console,U CO4 14 1. What steps are involved in compiling and running a Java R CO1 2 writes output to a file, and handles any potential exceptions. program? 2. Compare method overloading and method overriding in Provide detailed explanations of the code. U CO1 2 Java. 3. 19 Explain applets in Java. Describe the lifecycle of an applet U CO5 14 What is a class in Java? R CO2 2 4. What is the role of command line arguments in R 2 with examples. CO2 OR Java applications? 20 Explain the event handling mechanism in AWT. How U CO5 14 5. Define single inheritance in Java. R CO3 2 6. List the purpose of the super keyword in method R 2 does it differ from other event handling methods in CO3 Java? overriding. 7. What is the difference between System.in and System.out R 2 PART – C (1 X 10 = 10) CO4 Java? (Questions must be from Higher Order Thinking – Apply, Analyze ) 8. List the different methods available to read console input inU 2 CO4 Java. 21a) Create a base class Animal with a method sound(). Derive 9. Compare the difference between an applet and a regular U 2 classes Dog and Cat from Animal and override the sound() CO5 A CO4 10 Java application. method in both. Write a test program to demonstrate 10. Show how to create and start a new thread in Java using theU 2 polymorphism using method overriding. CO5 OR Thread class. PART B (Answer All Questions) ( 5 X 14 = 70) 21b) Design an abstract class Shape with abstract methods calculateArea() and calculatePerimeter(). Implement concrete 11 Explain the concepts of encapsulation and abstraction U CO1 14 A CO4 10 classes Circle and Rectangle that extend the Shape class. in OOP with relevant examples in Java. Write a program to demonstrate the use of these classes. OR Explain Object-Oriented Programming (OOP) key principles U CO1 14 12 with examples.
13 Summarize the main features of Java. How do these U CO2 14
features make Java a robust programming language? OR Course Coordinator Head of the Department 14 Explain how arrays and methods are used in Java to solveU CO2 14