0% found this document useful (0 votes)
9 views13 pages

Oop QB

OOPNQB

Uploaded by

divyavenu49
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views13 pages

Oop QB

OOPNQB

Uploaded by

divyavenu49
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

JAYA COLLEGE OF ENGINEERING AND TECHNOLOGY

QUESTION BANK

CS3391 OBJECT ORIENTED PROGRAMMING

UNIT I INTRODUCTION TO OOP AND JAVA

PART-A

1. What is Byte code? (Apr/May 2023)

2. Write the general form of the for-each version of the for statement? (Apr/May 2023)

3. Java language is Platform Independent. Justify your answer. (NOV/DEC 2022)

4. Can we access parent class variables in child class by using super keyword? (NOV/DEC 2022)

5. What is an array? How multidimensional arrays are implemented in Java? (NOV/DEC 2023)

6. Name the access modifiers in Java. (NOV/DEC 2022)

7. List out the features of Object Oriented Programming. (Apr/May 2024)

8. Give an example for defining constant in Java. (Apr/May 2024)

9. What is Class? Give an example?

10. What Is object? And write its syntax?

11. How many types of access specifies are there in OOP?

12. What is Encapsulation?

13. What is Data Abstraction?

14. What is Polymorphism?

15. Write the benefits and drawbacks of OOP?

16. Write the applications of OOP?

17. Write the types of Java Buzz words?

18. Draw the Structure of Java program?

19. How MANY TYPES OF Java tokens are there?

20. What is variable? Give an example?

21. What are Data types? Give an example?


22. What are the types of Operators?

23. Write the syntax for one dimensional array?

24. What is Static Member?

25. Write the types of JavaDoc comments?

PART-B

1. Explain in detail about Java’s iteration statements with example. (Apr/May 2023)

2. What is Constructor? Explain with example. (Apr/May 2023)

3. Differentiate between object oriented programming and procedure oriented programming.


(NOV/DEC 2022)

4. Write a Java program to find the greatest of three numbers. (NOV/DEC 2022)

5. Explain Constructor with an example. (NOV/DEC 2022)

6. Write a Java program to display the grade of the Students by using get() method to get marks
and compute() method to compute the average and display() method to display the grade of the
students. (NOV/DEC 2022)

7. List the symbols that are used as separators in Java and present an Outline of the Same. (NOV/DEC
2022)

8. Outline the primitive types of data in Java. (NOV/DEC 2022)

9. Outline the bitwise operators in Java that can be applied to the integer type. (NOV/DEC 2022)

10. Outline while and do-while iteration statements in Java with its general form.

11. Discuss the various access specifies in Java? (Apr/May 2024)

12. Explain Java static members with examples. (Apr/May 2024)

13.Explain in detail about Java Comments?

14.Explain in detail about Static Members?

15. What is Access specifiers and explain its types?


PART-C

1. Write a Java program to accept ‘n’ names, store it in an array, sort the names in an alphabetic
order and display the result. Use Classes and methods. (NOV/DEC 2022)

2. Write a Java program to accept two square matrices, store them in an array, add the matrices and
display the result. Use classes and methods. (NOV/DEC 2022)

3. Explain in detail the looping statement in Java?

4. Write the Java program to find the Factorial of a given number?

5. Explain in detail the control statement in Java?

6. Briefly explain the concepts of Polymorphism?

7. Write a Java program to perform Matrix Addition?

8. Write a Java program to perform Matrix Subtraction?

9. What is the difference between Break and Continue Statement?

10. Write a Java program to write a Do-While loop that Counts to 1 from 10?

UNIT II Inheritance, Packages and Interface

PART-A

1. What is the use of final-keyword? (Apr/May 2023)

2. How dynamic method resolution is achieved in Java? (Apr/May 2023)

3. Differentiate between Method overloading and overriding. (NOV/DEC 2022)

4. Can we access parent class variable in child class by using super keyword. (NOV/DEC 2022)

5. Define Inheritance. (NOV/DEC 2022)

6. How cans a subclass can call a constructor defined by super class. (NOV/DEC 2022)

7. Mention the use of constructor overloading. (Apr/May 2024)

8. IIustrate method overriding with an example. (Apr/May 2024)

9. What is API package?

10. Explain the term CLASSPATH?

11. What are the ways of importing the java packages?


12. List out four packages in java and highlight their features?

13. In Java what is the use of interface?

14. What is the difference between Super class and Subclass?

15. What is the purpose of final keyword?

16. Define the term Inheritance?

17. What is the use of Super keyword?

18. Differentiate between Inheritance and Polymorphism?

19. Distinguish between Static and Dynamic Binding?

20. What is the difference between Super class and Subclass?

21. Define Inheritance Hierarchy?

22. Can an abstract class be final?

23. State the condition for method overriding in Java?

24. What is Package?

25. What are the ways of importing the Java packages?

PART-B

1. What is a Package? Explain in detail about how the packages provide access control to various
categories of visibility for class members. (Apr/May 2023)

2. Explain in detail about the basics of inheritance and elaborate on any two inheritance
mechanism in Java. (Apr/May 2023)

3. Write a Java program for library interface with drawbook() returnbook() and checkstatus()
methods. (NOV/DEC 2022)

4. (a)Explain method overloading with an example. (NOV/DEC 2022)

(b)What are the advantages of using packages? (NOV/DEC 2022)

5. IIustrate how to add classes in a package and how to access these classes in another package.
(NOV/DEC 2022)

6. Outline the method overloading and method overriding in Java with code fragments. (NOV/DEC
2022)
7. What is an Interface? How to define an interface? How one or more classes can implement an
interface? Outline with code fragments. (NOV/DEC 2022)

8. With an example, explain the use of Abstract classes in Java. (Apr/May 2024)

9. Write briefly on Abstract classes with an example?

10. Explain Method Overriding in detail?

11. What is an Inheritance? How will you call parameterized constructor and overrideed method from a
parent class in sub class?

12. Write a Java program to calculate Area of rectangle using the Single Inheritance?

13. What is Static inner class?

14. Write a Java program to for computing Fibonacci Series?

15. Explain the concepts of overloading methods?

PART-C

1. What is user defined package? How to create and import a user defined package? Explain with
an example? (Apr/May 2024)

2. Discuss about the concepts of Inheritance in detail?

3. What is the difference between Hybrid and Hierarchal Inheritance?

4. What is the difference between Single and Multilevel Inheritance?

5. Explain in detail about the Final with Inheritance?

6. Explain simple interfaces and nested interfaces with examples?

7. What is Package? How its created and implemented in java?

8. Differentiate between the Abstract class and interfaces with an example program?

9. Write a note on Final Keyword?

10. State the purpose of Finalize () method in Java? Write an example explain how finalize () method can
be used in Java?
UNIT III Exception Handling and Multithreading

PART-A

1. List the values associated with the parameters of set priority () method of Thread class? (Apr/May
2023)

2. Define Deadlock? (Apr/May 2023)

3. Define Arithmetic Exception with example. (NOV/DEC 2022)

4. Name the two ways to create a thread in java. (NOV/DEC 2022)

5. Outline the difference between unlocked exception and checked exception. (NOV/DEC 2022)

6. Name the methods used by Java for interprocess communication to avoid polling. (NOV/DEC 2022)

7. Why to handle exception? (Apr/May 2024)

8. What is thread priority? How it can be set for a thread? (Apr/May 2024)

9. What is Multithreading?

10. What is an Exception? Give an example?

11. What is the use of try, catch keywords?

12. What is arrayIndexOutOfBoundsException?

13. What do you mean by Synchronization?

14. Name any four thread constructor?

15. Sketch the lifecycle of Thread?

16. What are the benefits of exception Handling?

17. What is compile time and runtime error?

18. What is the difference between throw and throws?

19. What is the difference between error and exception?

20. What is the need of multiple catch?

21. Explain the types of exception?

22. What is runtime exception?

23. Give the difference between thread and process?


24. What is Multithreading?

25.”Thread is a lightweight process”-comment?

PART-B

1. Explain in detail about Java’s Built-in Exceptions. Explain any there exceptions. (Apr/May
2023)

2. Discuss in detail about the methods to create a thread in Java. (Apr/May 2023)

3. Create a software for departmental stores to maintain the following details like item_no,
item_description, requested quantity, cost price. Provide the options to update the stock.
Calculate the selling price(SP=CP*20%).

Create an exception whenever the selling price of items exceeds the given amount. (NOV/DEC
2022)

4. Discuss about try, catch and finally Keywords in Exception Handling with an example.
(NOV/DEC 2022)

5. List and explain Data types and their Corresponding Wrapper class. (NOV/DEC 2022)

6. What is Java exception? How Java exception handling is managed? Outline. (NOV/DEC 2022)

7. Outline Java’s checked exceptions defined a java.lang package. (NOV/DEC 2022)

8. Present an outline of Java’s Multithreading system. Also outline the two ways to create a thread.
(NOV/DEC 2022)

9. Discuss about user defined package? How to create and import a user defined package? Explain with
example. (Apr/May 2024)

10. Explain the concepts of Wrapper classes with illustrative example?

11. Explain in detail bout Inter Thread Communication?

12. What is Thread Synchronization?

13. Describe the creation for single thread and multiple threads using an example?

14. Explain how the threads are created in Java>

15. How to extend the thread classes? Give an Example?


PART-C

1. Create a Central Library management system with libraries in different locations in a city.
Each Library can order a book from the central library and give it to the requesting customers.
Availability of that book should be updated on each lending. (NOV/DEC 2022)

2. Write a Java program with nested try statements that raises divide by zero exception and out of bound
exception, if the program contains statements with division operator and a divisor as a command line
argument. (Apr/May 2023)

3. How thread Synchronization is managed in Java. Give suitable example. (Apr/May 2024)

4. What is meant by Concurrent programming? Define thread. Discuss the two ways of implementing
thread using an example?

5. Explain: States of thread with a neat diagram?

6. Explain in detail the different states of Thread?

7. With suitable Java program, explain user defined exception handling?

8. Write a note on build in exception?

9. Explain the exception Hierarchy?

10. Draw the exception Hierarchy in java and explain with example throwing and catching exception and
the common exception?

Unit IV I/O, Generics, String Handling

PART-A

1. State the purpose of Valueof() method in String class. (Apr/May 2023)

2. List any two methods available in Data Output Interface. (Apr/May 2023)

3. What is Thread pool? (NOV/DEC 2022)

4. When a class must be declared as abstract. (NOV/DEC 2022)

5. What are Streams? (NOV/DEC 2022)

6. Why parameterized types are important. (NOV/DEC 2022)

7. Write any four methods associated with basic string class. (Apr/May 2024)

8. What is String Buffer Class? (Apr/May 2024)


9. What are streams?

10. What is Input and Output streams?

11. List the byte stream classes?

12. What is the use of seek method?

13. List any two advantages of type parameter?

14. Enlist the two common constructors FileInputStream?

15. What is absolute file name?

16.What is Byte stream? Enlist its super classes?

17. What is Character stream? Enlist its super classes?

18. Give an example on stream?

19. What is the use of Seek method?

20. Write a Java Code to check if the command line argument is file or not?

21. Enlist the two common constructors of FileInputStream?

22. What is the need for generic programming?

23. Write an example for generic classes?

24. Can generic be used with Inheritance in Several ways? What are they?

25. List any tow advantages of type parameter?

PART-B

1. Discuss in detail about the restrictions and limitations of using generics in Java Programming.
(Apr/May 2023)

2. Explain the following statement “String Buffer class create mutable stings”. Explain about
StringBuffer class. Compare String class with StringBufferclass. (Apr/May 2023)

3. Explain String buffer class with example. (NOV/DEC 2022)

4. Outline parameter type bounds with an example. (NOV/DEC 2022)

5. Apply the String buffer class with example. (NOV/DEC 2022)

6. Compare the two Strings


7. Reverse the String- “Happy” and “Sad”.

8. Outline reading console input and writing console output in Java. (NOV/DEC 2022)

9. Present an outline of FileInputStream and FileOutputStream classes. (NOV/DEC 2022)

10. What is StringBuffer? Name and outline the constructors defined by StringBuffer with code
fragments. (NOV/DEC 2022)

11. Write a Java program to read data from a file and write data to a file. (Apr/May 2024)

12. Write a simple Java program to check the PALINDROME of the given String?

13. Write the Java program illustrating the difference between the capacity and length function of
StringBuffer?

14. Explain in detail about String methods?

15. Explain the generic classes and generic methods with an example?

PART-C

1. Write Java program to copy a text file into another text file and to raise exceptions for all
cases. (Apr/May 2023)
2. Discuss about Generic classes and generic methods in Java. (Apr/May 2024)
3. Explain in detail about Reading and writing files? (NOV/DEC 2019)
4. Write a Java program to collect the input as a decimal number of integer type and converts it into a
String equivalent hexadecimal number?
5. Explain in detail about Generic method with an example?
6. Mention the motivation of generic programming?
7. Explain in detail about the following with an example
(i) Reading from a File (ii) Writing in a File

8. Explain I/O Streams with an example?

9. Explain in detail about String Buffer class with an example?

10. Differentiate the generic classes and generic methods in Java with an example?
Unit V Javafx Event Handling, Controls and Components

PART-A

1. What is the use of adapter class? (Apr/May 2023)

2. List any two forms of CheckBoxMenuItem constructors. (Apr/May 2023)

3. What is layout manager and what are different types of Layout managers available in java
AWT. (NOV/DEC 2022)

4. Differentiate Hbox and Vbox. (NOV/DEC 2022)

5. What is JavaFX? (NOV/DEC 2022)

6. Write a note on HBox and VBox. (NOV/DEC 2022)

7. Why JAVAFX is preferred for building Internet applications? (Apr/May 2024)

8. Write the constructors of HBox class. (Apr/May 2024)

9. What are the main components of JavaFX applications?

10. What is JAVAFX?

11. What is Grid pane?

12. Define HBox?

13. What is property binding?

14. What are the types of keyboard events?

15. Define Label?

16. What are the various features of JavaFX ?

17. Which method is used to launch JavaFX application?

18. What are the main components of JavaFX application?

19. Explain the term- Stage and scene used n JavaFX application?

20. What are various features of JavaFX?

21. What are Menu bars?

22. What is Menu?

23. What is Grid pane?


23. What is Stack pane?

24. What is Layout?

25. Define Scrollbar?

PART-B

1. Write a java program with nested try Statements that raises divide by zero exception and out
of bound exception, if the program contains a statement with division operator and a divisor as a
command line argument. (Apr/May 2023)

2. Write a java program to copy a text file into another text file and to raise exceptions for all
cases. (Apr/May 2023)

3. List and explain the various layouts in java GUI. (NOV/DEC 2022)

4. Explain the four types of buttons swing. (NOV/DEC 2022)

5. Discuss the following with example: (NOV/DEC 2022)

(i) Mouse listener

(ii)Mouse motion listener

6. What is button? Name and outline the types of buttons JavaFX provides with visual
representations. (NOV/DEC 2022)

7. Name and outline the types of panes JavaFX provides for organizing nodes in a container.
(NOV/DEC 2022)

8. With an example code explain how the key events are handled using JAVAFX. (Apr/May 2024)

9. Write and explain the constructors and commonly used methods for menu.

10. Write a JavaFX applications to display menu, menu bar and menu items.

11. Differentiate HBox and VBox.

12. Explain in detail about Layouts.

13. Explain in detail about Scrollbar.

14. Explain in detail about Radio Buttons with an example program?

15. What is the important method used in JavaFX application?


PART-C

1. With neat example, Explain Java AWT Menu bars and Menu items. (NOV/DEC 2022)

2. Write a Java program to illustrate the use of JAVAFX checkbox and choice box controls. (Apr/May
2024)

3. Write a JavaFX application for creating a login form.

4. Explain in detail about Combo BOX?

5. Explain the basic structure of JavaFX program with suitable example.

6. Explain the concepts of Panes, UI control and shapes.

7. Explain in detail about Event Basics.

8. Discuss briefly about Handling Key and Mouse Events.

9. Write a JAVA program to display the mouse position in the form of (x,y) Co- Ordinates when the text
on the screen is dragged somewhere else.

10. Explain in detail about Keyboard Events.

You might also like