JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year OBJECT ORIENTED PROGRAMMING THROUGH JAVA Previous Question Paper (February - 2024 - R16)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
Identify the differences between Classes and Instances.
Answer
A class is a blueprint or template that defines the properties and behaviors of objects, whereas an instance (object) is a concrete realization of that class created in memory. A class is declared once, while multiple instances can be created from a single class, each maintaining its own state.
Explain the need of Constructors?
Answer
Constructors are special methods used to initialize objects at the time of their creation. They ensure that an object starts in a valid state by assigning initial values to instance variables, thereby preventing the use of uninitialized data and enforcing encapsulation requirements.
Discuss the concept of Packages.
Answer
Sign in to view the complete answer paper.
Describe the generics with examples.
Answer
Sign in to view the complete answer paper.
Explain the need of Multithreading.
Answer
Sign in to view the complete answer paper.
List the thread priorities with examples.
Answer
Sign in to view the complete answer paper.
Write a short note on String Tokenizer.
Answer
Sign in to view the complete answer paper.
Explain the Collection algorithms.
Answer
Sign in to view the complete answer paper.
Explore GUI Programming with Swing.
Answer
Sign in to view the complete answer paper.
Describe the Event Handling in detail.
Answer
Sign in to view the complete answer paper.
Part B
Can you demonstrate how the principles of object-oriented thinking can be applied to solve a real-world problem?
Answer
Sign in to view the complete answer paper.
Using Java, can you implement a practical example of method overriding to demonstrate polymorphic behavior?
Answer
Sign in to view the complete answer paper.
Can you create a multilevel class hierarchy in Java to model a system with different levels of abstraction?
Answer
Sign in to view the complete answer paper.
Given a scenario, can you propose a solution that leverages Java's inheritance concepts to optimize code structure?
Answer
Sign in to view the complete answer paper.
Write a Program to demonstrate how to create a package and use it in another class.
Answer
Sign in to view the complete answer paper.
Give an Example to demonstrate the extension of interfaces in Java.
Answer
Sign in to view the complete answer paper.
Demonstrate Enumerations and Auto Boxing in Java.
Answer
Sign in to view the complete answer paper.
Analyze the impact of not using exception handling in a program. How does it affect the overall program flow and user experience?
Answer
Sign in to view the complete answer paper.
Analyze the advantages and disadvantages of thread-based multitasking compared to process-based multitasking. In what scenarios is one more suitable than the other?
Answer
Sign in to view the complete answer paper.
Evaluate the role of throw, throws, and finally in exception handling. How do these constructs contribute to robust error management in a program?
Answer
Sign in to view the complete answer paper.
Evaluate the use of wait() and notify() for inter-thread communication. How do these mechanisms contribute to effective coordination between threads?
Answer
Sign in to view the complete answer paper.
Analyze the use of utility classes in complex data processing scenarios. How can these classes contribute to code readability and maintainability, and are there any trade-offs associated with their usage?
Answer
Sign in to view the complete answer paper.
Critically evaluate the design choices made in the definition of collection interfaces. How do these choices contribute to the flexibility and extensibility of the Collections Framework?
Answer
Sign in to view the complete answer paper.
Analyze the impact of using for-each loops on code readability and maintainability. How does this alternative contribute to or hinder the expressiveness of the code?
Answer
Sign in to view the complete answer paper.
Propose a comprehensive comparison between AWT and Swing, considering not only their limitations but also their strengths. Formulate recommendations for situations where AWT might still be preferable.
Answer
Sign in to view the complete answer paper.
Synthesize a strategy for handling simultaneous mouse and keyboard events in a Swing application. Propose solutions for scenarios where efficient handling of multiple input sources is crucial.
Answer
Sign in to view the complete answer paper.