KEMBAR78
OOP Assignment Question Paper | PDF
0% found this document useful (0 votes)
4 views1 page

OOP Assignment Question Paper

The document outlines an assignment on Java OOP concepts, divided into three parts: short answers, coding tasks, and critical thinking. It requires definitions and examples of OOP concepts like encapsulation, inheritance, polymorphism, and abstraction, along with practical coding exercises. Additionally, it prompts critical thinking about the advantages of OOP in large-scale applications and its application in everyday software design.

Uploaded by

sarvaiyaharsh90
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)
4 views1 page

OOP Assignment Question Paper

The document outlines an assignment on Java OOP concepts, divided into three parts: short answers, coding tasks, and critical thinking. It requires definitions and examples of OOP concepts like encapsulation, inheritance, polymorphism, and abstraction, along with practical coding exercises. Additionally, it prompts critical thinking about the advantages of OOP in large-scale applications and its application in everyday software design.

Uploaded by

sarvaiyaharsh90
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/ 1

Name:

Contact No:
Email:
Are you Interested with working us or growing with us? Yes / No
If yes then in which technology?

Java OOP Concepts – Assignment

Part A – Short Answer (Theory)


1. Define each OOP concept with an example from daily life:

• - Encapsulation
• - Inheritance
• - Polymorphism
• - Abstraction

2. Explain how Java supports encapsulation with an example using private, getters, and setters.

3. Describe the difference between compile-time and run-time polymorphism with examples.

4. How is abstraction achieved in Java? Give one real-life analogy.

Part B – Coding Tasks (Implementation)


1. Encapsulation:
Create a class Student with private fields name and rollNo. Add getter and setter methods to access and
modify the values.

2. Inheritance:
Create a superclass Animal with a method sound(). Create a subclass Dog that overrides the sound() method
to print “Dog barks”.

3. Polymorphism:
Write a class Shape with a method area(). Overload the method to calculate the area of a circle and a
rectangle.

4. Abstraction:
Create an abstract class Appliance with an abstract method turnOn(). Extend it with a class Fan that
implements turnOn().

Part C – Critical Thinking


1. Why is OOP preferred in large-scale application development?

2. Give an example of a software or app you use daily and explain how OOP might be applied in its design.

You might also like