The document outlines an assignment for II-MCA-T204 on Object-Oriented Programming using Java, detailing various topics such as definitions of objects and classes, inheritance, interfaces, exception handling, multithreading, and event-driven programming. It includes numerous questions and programming tasks aimed at assessing understanding of Java fundamentals and OOP concepts. The assignment covers both theoretical questions and practical programming exercises to demonstrate proficiency in Java.
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
0 ratings0% found this document useful (0 votes)
0 views6 pages
Assignment Oop Using Java 2025
The document outlines an assignment for II-MCA-T204 on Object-Oriented Programming using Java, detailing various topics such as definitions of objects and classes, inheritance, interfaces, exception handling, multithreading, and event-driven programming. It includes numerous questions and programming tasks aimed at assessing understanding of Java fundamentals and OOP concepts. The assignment covers both theoretical questions and practical programming exercises to demonstrate proficiency in Java.
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/ 6
ASSIGNMENT 2025
II-MCA-T204-OOP USING JAVA
INTRODUCTION TO OOP AND JAVA FUNDAMENTALS 1. Define Objects and classes in java. 2. How does one import a single package? 3. What is the default access to a member in a class? 4. What is a package? 5. Define class. 6. List any four Java Doc comments. 7. What is meant by private access specifier? 8. What do you mean by instance variables? 9. Mentions the purpose of finalize method. 10. What are the key characteristics of objects? 11. Define finalize method. 12. Mention the features of JAVA. 13. List the access specifiers used in java? 14. Define the characteristics of objects? 15. What is Abstract class? 16. What is static and dynamic binding in java? 17. Name any three tags used in Java Doc Comment 18. What is method overloading and method overriding? 19. Define arithmetic operators in java? 20. Define bitwise operator. 21. Define Precedence order. 22. What are methods and how are they defined? 23. What are different types of access modifiers (Access specifiers)? 24. What is an Object and how do you allocate memory to it? 25. list the usage of Java packages. 26. What gives java it’s “write once and run anywhere” nature? 27. What is static variable and static method? 28. Differentiate between a Class and an Object? 29. How is polymorphism achieved in java? 30. (i) What is a constructor? What is the use of new method? (ii) Give the syntax for static method and its initialization. (iii)Explain arrays in java. 31. (i)What is class? How do you define a class in java? (ii)Explain the following in Strings: (1) Concatenation (2) Substrings. (iii)Explain any four methods available in string handling. (iv)What is a Package? How does a complier locate packages? 32. i) Explain what is OOPS and explain the features of OOPS. (ii)Discuss about the usage of constructor with an example. Using Java. 33. i)Define package. Explain the types of package with its importance. ii)What is package? How to add a class into a package? Give example. 34. i)Explain briefly about object-oriented programming concepts differ from structured programming concepts. ii)How is OOP different from procedural programming language? 35. Write a java program for push and pop operations in stack using arrays in classes and object. 36. Write a java program to sort ten names in descending order. 37. i) Describe the concept of OOP. (ii) What is meant by overriding method? Give example. (iii) Write a JAVA program to reverse the given number. 38. i)What is meant by package? How it is created and implemented in JAVA. (ii)Write a JAVA program to find the smallest number in the given list. 39. Write a Java program to sort the elements in increasing order? 40. i) Define class? ii)Write short notes on Access specifiers iii) string in JAVA iv) Explain the term static fields and methods and explain its types with examples 41. Define array. What is array sorting and explain with an example? 42. State and explain documentation comments in java
INHERITANCE AND INTERFACES
1. What is meant by parameter passing constructors? Give example. 2. What is Constructor? 3. What is Abstract class? 4. What is meant by Inheritance Hierarchy? Give an Example. 5. In java what is the use of Interfaces? 6. How to prevent inheritance? 7. Define Inheritance Hierarchy. 8. What is Interface? 9. What is object cloning? How to object clone? What is meant by object cloning? 10. Differentiate copying and cloning. 11. Define inner classes. Why would you want to do that? 12. Can we override a super class method which is throwing an unchecked exception with checked exception in the sub class? 13. What is meant by an inner class? 14. What is the use of ‘Super’ Keyword? Give an example. 15. What is the difference between String and String Buffer? 16. What is the difference between this () and super ()? 17. What are interface and its use? 18. Can you have an inner class inside a method and what variables can you access? 19. What is the difference between abstract class and interface? 20. What is the difference between a static and a non-static inner class? 21. Define superclass and subclass? 22. What is reflection API? How are they implemented? 23. What is the useful of Interfaces? 24. Define Protected members. 25. Write short notes on final classes and methods? 26. Difference between interface and extending interface? 27. List out the types of inheritance in java 28. List out the types of Constructors? 29. Explain with an example the following features of Constructors: (i) Overloaded constructors (ii) A Call to another constructor with this operator (iii) An object initialization block (iv) A static initialization block 30. How Strings are handled in java? Explain with code, the creation of Substring, Concatenation and testing for equality. 31. (i) Explain any four string operations in Java. With suitable examples. ii)Explain string handling classes in Java with examples. 32. i)Write down the techniques to design good classes. ii) Explain about java building string functions with an example. 33. What is meant by constructor? Describe the types of constructors supported by Java with example? 34. (i) Explain Inheritance and class hierarchy. (ii) Define Polymorphism. (iii)Write briefly on Abstract classes with an example. 35. (i) Explain the following with examples: a. The clone able interface b. The property interface. (ii) What is a static Inner class? Explain with example. 36. (i) Explain interfaces with example. (ii) Compare interfaces and abstract classes. 37. (i) Explain interfaces with example. (ii) Compare interfaces and abstract classes. 38. (i) What is meant by object cloning? Explain it with an example. (ii)Discuss in detail about inner class, with its usefulness.
EXCEPTION HANDLING AND I/O
1. What is the use of final keyword? 2. How will create throw exception in exception handling? 3. What is an exception? 4. Mention the different ways to generate an Exception? 5. Can we keep other statements in between try, catch and finally blocks? 6. What is Re-throwing an exception in java? 7. What are checked and unchecked exceptions in java? 8. What are run time exceptions in java. Give example? 9. There are three statements in a try block – statement1, statement2 and statement3. After that there is a catch block to catch the exceptions occurred in the try block. Assume that exception has occurred in statement2. Does statement3 get executed or not? 10. Can we write only try block without catch and finally blocks? 11. What are Byte Stream in Java? 12. How to read strings of text from a file? 13. Write a note on char Array Reader. 14. What are Character Stream in Java? 15. What are the different states of a thread? 16. What is meant by checked and unchecked exception? 17. How is custom exception created? 18. Mention the stream I/O operations. 19. What is stream? 20. Mention the different ways to generate an Exception? 21. What is OutOfMemoryError in java? 22. Give some examples to checked exceptions? 23. Give some examples to unchecked exceptions? 24. What are FileInputStream and FileOutputStream? 25. What is File class? 26. What is a IO stream? 27. Define stack trace elements. 28. What is the difference between error and exception in java? 29. Give example for built in exception? 30. Give any two methods available in Stack trace Element 31. (i) Explain the exception hierarchy. (ii) Explain the concept of throwing and catching exception in java. 32. (i) Explain the concept of throwing and catching exception in java. (ii) State the situations where assertions are not used. (iii) Give an overview of logging. 33. Explain briefly about user defined exceptions and stack trace elements in exception handling mechanisms. 34. Discuss on Exception handling in detail. 35. What is meant by exceptions? Why it is needed? Describe the exception hierarchy. Write note on Stack Trace Elements. Give example. 36. ii)Define exception and explain its different types with example ii) What is final keyword? Explain with an example?
MULTITHREADING AND GENERIC PROGRAMMING
1. What are the different states in thread? 2. What do you mean Synchronization? 3. Mention the two mechanisms for protecting a code block from concurrent access. 4. What do you mean by Threads in Java? 5. What is multithreading. 6. What is meant by notify methods in multithreading? 7. Name any four thread constructors. 8. What is the need for threads? 9. How will interrupt threads in multiple windows? 10. Write the life cycle of thread. 11. What is meant by event-driven programming? 12. What are the properties of a thread? 13. List out the motivation needed in generic programming. 14. How is throw exception created in exception handling? 15. List out the advantages of multithreading. 16. How Generics works in Java? What is type erasure? 17. How to write a generic method which accepts generic argument and return Generic Type? 18. Can we use Generics with Array? 19. List out the Advantage of Java Generics. 20. What is meant by multithreading? 21. What are the different identifier states of a thread? 22. What method must be implemented by all threads? 23. Define Multitasking. 24. Define Inter-thread communication? 25. Difference between wait and sleep? 26. What about is Interrupted and interrupted method? 27. What if we call run() method directly instead start() method? 28. Define daemon thread? 29. List out the different Methods for Java Daemon thread by Thread class 30. How to perform single task by multiple threads? 31. (i) What is a thread? Explain its states and methods. (ii) Explain thread properties. 32. (i) Explain the methods of interrupting threads in java. (ii) What is Event-driven programming? Explain. 33. Explain the procedure for running a task in a separate thread and running multiple threads. 34. Explain the states of threads and how the thread is interrupted? 35. (i) Explain how threads are created in Java. (ii) Write about various threads states in Java. 36. Explain briefly about thread synchronization in multithreading concepts. 37. Explain the following (i) States of a thread with a neat diagram. (ii) Thread priorities. 38. i) How to implement runnable interface for creating and starting threads? ii) Define threads. Describe in detail about thread life cycle.
EVENT DRIVEN PROGRAMMING
1. What is virtual machine in generic programming? 2. Define generic class. 3. Define the term virtual machine. 4. What is meant by generic classes? Give example. 5. What is the need for generic programming? 6. Write about simple generic class with an example. 7. What are Wildcard Types? 8. Why generic programming is required? 9. State the features of Swing. 10. What are the steps needed to show a Frame? 11. What is adapter class? 12. Define frame. 13. Mention any four event names of a button component. 14. How do you manage the color and font of a graphics in applet? 15. What is meant by window adapter classes? 16. Differentiate GridBagLayout from GridLayout 17. How are frames created in Java? 18. Give the value for the following predefined actions. 19. List the AWT controls? 20. What method is used to distinguish between single, double and triple mouse clicks? 21. What is a JPanel object? 22. What is the function of a. SetLayout-The SetLayout functionchanges the layout of a device context (DC). b. Flow Layout 23. Write a note on push Button Control? 24. Distinguish between component and container. 25. Write a note on Borderlayout? 26. What is the difference between the ‘Font’ and ‘FontMetrics’ class? 27. How would you create a button with rounded edges? 28. Difference between Swing and Awt? 29. What is an event and what are the models available for event handling? 30. What is the difference between scrollbar and scrollpane? 31. Explain about the concepts of creating and positioning of frame 32. Define Event handling write a program to handle a button event. 33. Explain the classes under 2D shapes. Working with 2D Shapes. 34. Explain event handling with examples. 35. Explain action event with an example. 36. What are the swing components? Explain. 37. Describe the AWT event hierarchy. 38. Give the methods available in graphics for COLOR and FONTS.