0% found this document useful (0 votes)
10 views4 pages

Assingment Java

The document outlines assignments related to Object-Oriented Programming (OOP) with Java, covering fundamental concepts such as classes, objects, encapsulation, inheritance, and polymorphism. It includes short answer questions and coding practice tasks aimed at reinforcing understanding of Java programming principles. The submission dates for the assignments are specified as October 10, 2025, and October 20, 2025.

Uploaded by

satyam3428
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)
10 views4 pages

Assingment Java

The document outlines assignments related to Object-Oriented Programming (OOP) with Java, covering fundamental concepts such as classes, objects, encapsulation, inheritance, and polymorphism. It includes short answer questions and coding practice tasks aimed at reinforcing understanding of Java programming principles. The submission dates for the assignments are specified as October 10, 2025, and October 20, 2025.

Uploaded by

satyam3428
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/ 4

OOPS WITH JAVA

MODULE-1

ASSINGNMENT 1

1. What is Object-Oriented Programming? Explain its importance.


2. Define a class and an object with an example.
3. What are the main principles of Object-Oriented Programming?
4. Differentiate between procedure-oriented and object-oriented programming.

5. What are the advantages of using Java as a programming language?

6. Explain the concept of data abstraction with an example.

7. What is encapsulation? How is it implemented in Java?

8. Differentiate between abstraction and encapsulation.

9. Define inheritance. What are its benefits?

10. Explain polymorphism and its types with examples.

11. What is a constructor? How is it different from a method?

12. What are access modifiers in Java? List and explain all types.

13. What are static variables and methods? When should they be used?

14. Explain the difference between instance and local variables.

15. What is the difference between method overloading and method overriding?

SUBMISSION DATE:10/10/2025
ASSNGNMENT -2

B. Short Answer Questions

1. Write the syntax for defining a class and creating an object in Java.

2. What are the naming conventions followed in Java programming?

3. What are Java’s primitive data types? List them with examples.

4. Explain how memory allocation works for objects in Java.

5. Write a short note on “Java Virtual Machine (JVM)”.

6. What is the difference between JDK, JRE, and JVM?

7. What is meant by platform independence in Java?

8. What is the purpose of the this keyword in Java?

9. Explain the use of the super keyword in Java.

10. What is constructor overloading? Give an example.

11. Can we overload the main() method in Java? Explain.

12. What happens if a constructor is declared private?

13. Can a constructor be abstract or static? Justify your answer.

14. What are wrapper classes in Java?

15. Explain the difference between == operator and .equals() method in Java.
ASSINGNMENT-3

Coding-Based Practice Questions

1. Write a Java program to print the details of a student using a class and object.

2. Write a Java program to demonstrate the use of constructors.

3. Write a program to create a class Car with attributes and a method to display details.

4. Write a program to illustrate method overloading using the concept of area


calculation.

5. Write a Java program that demonstrates the use of this keyword.

6. Write a Java program showing the use of static variables and methods.

7. Create a Java program with a class Employee containing methods for reading and
displaying employee data.

8. Write a program to demonstrate the concept of encapsulation using private data


members.

9. Write a Java program that shows the difference between instance and class
members.

10. Create a program that demonstrates constructor chaining in Java.

11. Write a Java program that accepts user input to set and get object data.

12. Create a program that shows multiple objects of a class and displays their data.

13. Write a program demonstrating the use of getter and setter methods.

14. Write a Java program to find the area of a rectangle using a class and methods.

15. Write a program to demonstrate the difference between default and parameterized
constructors.

16. Application-Based Questions

17. How does Java achieve platform independence? Explain with diagrammatic
representation.

18. Compare and contrast C++ and Java as object-oriented programming languages.
19. Explain how encapsulation helps in data security with a real-world example.

20. Describe the life cycle of an object in Java — from creation to garbage collection.

21. Analyze how the principles of OOP improve modularity and reusability in software
design.

SUBMISSION DATE 20 OCTOBER

You might also like