Unit I - Introduction to OOP Concepts and Control Structure
Remember (Knowledge-based – Recall of facts and basic concepts)
1. Define the following terms:
o Procedural programming
o Inheritance
o JVM
2. Name and explain the four primitive data types in Java.
3. What is the role of the import statement in a Java program?
4. Describe the difference between primitive types and reference types in Java.
5. Define polymorphism in object-oriented programming.
Understand (Comprehension – Explain ideas or concepts)
6. List and explain four main programming paradigms.
7. Explain the need for Object-Oriented Programming. What benefits does it provide over
procedural programming?
8. Explain the concept of data encapsulation and why it is important.
Apply (Use information in new situations)
9. Write a simple Java class named Car with two data members: model (String) and year
(int), and a method display() that prints these details.
10. Write a Java for loop to print all even numbers from 5 to 15.
11. Design a simple Java class Student with attributes name (String) and rollNumber (int),
and include a method displayDetails() that prints these attributes.
Analyze (Draw connections among ideas)
12. Compare and contrast Procedural Programming and Object-Oriented Programming in
terms of structure and data handling.
13. Differentiate between method overloading and method overriding with examples.
Evaluate (Justify a decision or course of action)
14. Justify why Java is considered an Object-Oriented Programming language.
15. Evaluate the statement: “Inheritance promotes code reusability.” Support your answer
with reasons.
Unit II - Introduction to Classes and Objects and Arrays
Remember (Recall of basic facts and concepts)
1. Define a constructor in Java and write its purpose.
2. What is the purpose of the this keyword in Java?
3. What is the difference between ByteStream and CharacterStream?
4. Explain the difference between a field and a method in a Java class.
5. State the syntax to create a one-dimensional array in Java.
6. Name the three predefined I/O streams in Java.
7. What happens if a Java class doesn’t explicitly define a constructor?
Understand (Explain ideas or concepts)
8. What is the use of get and set methods? Why are they needed?
9. Why is method overloading useful in Java programs? Give an example to support your
answer.
10. Explain the scope of variables declared within a method and those declared at the class
level.
11. Explain how objects are passed as parameters in Java.
Apply (Use information in new situations – write/code/implement)
12. Write a Java class Book with fields title and price, and include a constructor to
initialize them.
13. Write a method in Java that takes an array of integers and returns the maximum value.
14. Write Java code to read an integer from the console using Scanner.
15. Create a Java class Employee with fields name and salary. Include:
Constructor
display() method
increaseSalary(double percent) method
16. Write a Java program that:
Accepts 5 integers from the user
Stores them in an array
Prints the average
17. Create a method that accepts an array of integers and prints all even numbers.
18. Write a Java class Rectangle with two fields: length and width. Include a constructor,
and a method to compute area.
19. Use a for-each loop to iterate over an array of strings and print them.
Analyze (Distinguish between parts, infer connections)
20. Compare the behavior of static and instance methods. When would using a static method
lead to issues in an object-oriented system?
21. Differentiate between ByteStream and CharacterStream in Java. When is each
appropriate to use in a real-world application such as file reading or form input?
22. Given a Java program that uses overloaded methods, analyze how the JVM determines
which method to invoke. Explain using method signature rules.
Evaluate (Justify decisions, critique concepts)
23. Evaluate the implications of variable-length argument lists on method design. When does
it improve code readability, and when might it reduce clarity or type safety?
24. Evaluate the effectiveness of using command-line arguments for program input. What are
the securities or usability concerns compared to using Scanner or GUI?
25. Evaluate the use of constructors (default vs. parameterized) in class design. Which
approach is better for initializing complex objects and why?