Skip to content
You said:
give me some java oops programming ques ons which are
easy,medium,adance for mid 1 exams
ChatGPT said:
Here's a well-balanced list of Java OOPs programming ques ons,
categorized into Easy, Medium, and Advanced levels — perfect for a
Mid 1 exam. These ques ons test understanding of classes, objects,
inheritance, polymorphism, encapsula on, abstrac on, and other
core OOP concepts in Java.
✅ Easy Level Ques ons (Basic understanding of OOP)
Create a class Student with fields name, rollNumber, and marks.
Write a method to display the student details.
Write a class Circle with radius as a data member. Include methods
to calculate area and circumference.
Create a class Rectangle with constructors (default and
parameterized) and a method to calculate the area.
Write a program to demonstrate method overloading using a class
Calculator.
Create a class Person with name and age as a ributes. Create an
object and set values using a constructor.
🟡 Medium Level Ques ons (Understanding of inheritance,
polymorphism, encapsula on)
Create a class Animal with a method makeSound(). Extend it in Dog
and Cat classes and override the method. Demonstrate run me
polymorphism.
Implement a class Employee with private fields. Use ge ers and
se ers to access the fields (encapsula on).
Write a program that uses an abstract class Shape with abstract
methods area() and perimeter(). Extend it in Circle and Rectangle
classes.
Demonstrate the use of the final keyword with variables, methods,
and classes in Java.
Create a class hierarchy: Vehicle → Car → ElectricCar. Demonstrate
mul level inheritance.
🔴 Advanced Level Ques ons (Abstract classes, interfaces,
polymorphism, constructor chaining)
Design a program using interfaces. Create an interface Flyable with
method fly(), and implement it in classes Bird and Airplane.
Demonstrate constructor chaining using this() and super() in a class
hierarchy involving Person and Employee.
Create an abstract class BankAccount with deposit and withdraw
methods. Extend it in SavingsAccount and CurrentAccount.
Implement interest logic.
Create an interface Taxable with a method calculateTax(). Implement
it in classes Employee and Product. Show dynamic binding.
Design a class Library that maintains a list of books. Implement
addBook, removeBook, and searchBook methods using basic
object-oriented principles.
💡 Tip for Exam Prep:
Ensure students know the syntax and concept of inheritance
(extends), interfaces (implements), and abstract classes.
Prac ce using super, this, access modifiers, and constructor
overloading.
Include small code snippets or write class diagrams in exams to
enhance understanding.
Would you like these ques ons forma ed for a printable exam sheet
or with sample solu ons too?
You said:
give me some java oops programming ques ons at least more than
50 which are easy,medium,adance for mid 1 exams
ChatGPT said:
Here’s a comprehensive list of 60+ Java OOPs programming
ques ons, categorized into Easy, Medium, and Advanced levels —
perfect for Mid-1 exams or OOPs prac ce sets.
✅ Easy Level (Basics of OOPs - 20 Ques ons)
Write a Java program to create a class Student with fields name,
rollNo, and marks. Display the details.
Create a class Book with a ributes tle, author, and price. Write
methods to display book details.
Write a program to demonstrate default constructor and
parameterized constructor.
Implement a class Circle that calculates area and circumference
using methods.
Create a class Calculator with overloaded methods for addi on of 2
and 3 numbers.
Write a program to demonstrate how to create and use objects in
Java.
Write a class Rectangle with methods to calculate area and
perimeter.
Create a class Person with a method displayInfo(). Create two objects
and display details.
Demonstrate how to use this keyword to differen ate instance
variables from parameters.
Write a program to take user input and store it in class variables.
Create a class Car with a ributes make, model, year. Print car details
using a method.
Write a program to create a class Employee with a ributes name, id,
salary.
Create a Laptop class with default and parameterized constructors.
Write a program that uses se er and ge er methods for accessing
private variables.
Create a class Movie with fields name, director, and ra ng. Print
details.
Create a class Account with deposit and withdraw methods.
Create a class Dog with a bark() method. Call the method using an
object.
Write a class to swap two numbers using a method.
Create a class with a method that returns the square of a number.
Create a method isEven() that returns true if the number is even.
🟡 Medium Level (Inheritance, Polymorphism, Abstrac on - 25
Ques ons)
Create a base class Animal and derived classes Dog, Cat.
Demonstrate inheritance.
Demonstrate method overriding using a class hierarchy Shape →
Circle.
Write a program that shows run me polymorphism with Animal
superclass and Dog, Cat subclasses.
Create a class Employee with private fields and use ge er and se er
methods (Encapsula on).
Write a program with an abstract class Shape having abstract
methods area() and perimeter().
Create a class hierarchy Person → Student → EngineeringStudent.
Show mul level inheritance.
Demonstrate constructor chaining using this() and super().
Write a program using the final keyword with class, method, and
variable.
Create an interface Printable and implement it in classes Document,
Image.
Create a class BankAccount with deposit and withdraw methods.
Create a subclass SavingsAccount that adds interest calcula on.
Demonstrate mul ple constructors in a class using constructor
overloading.
Write a Java program that overrides the toString() method in a class.
Write a program with a base class Vehicle and a subclass Bike. Add
specific methods.
Demonstrate use of super keyword to call parent class constructor.
Create a class Shape with overloaded area() methods for circle and
rectangle.
Create an interface Playable and implement it in Football and Cricket
classes.
Create a class University and class Student. Establish a has-a
rela onship (composi on).
Implement a simple calculator using switch-case and methods in a
class.
Write a class TV with methods to turn on/off and change channel.
Create a class hierarchy: Appliance → Fan → SmartFan and
demonstrate method overriding.
Write a program that uses instanceof to check object type before
cas ng.
Create a class Book with sta c and non-sta c members. Show their
usage.
Write a program that uses the sta c keyword for a counter that
counts number of objects.
Create a Library class that stores mul ple books using an array of
objects.
Create a class Student that implements the Comparable interface to
sort by marks.
🔴 Advanced Level (Interfaces, Abstract Classes, Design Logic - 20
Ques ons)
Design an interface Flyable with method fly(). Implement it in Bird
and Helicopter.
Create an abstract class Employee with abstract method
calculateSalary(). Extend it in FullTimeEmployee and
PartTimeEmployee.
Demonstrate diamond problem using interfaces and resolve it using
Java 8 default methods.
Implement a class TaxPayer that implements Taxable interface with
calculateTax() method.
Create a mini-library system where Library contains list of Book
objects and allows adding/removing books.
Implement an example of interface inheritance (interface extending
another interface).
Write a Java program using abstract classes and interfaces together.
Create a class Vehicle and an interface Engine. Implement both in
Car class.
Create a generic class Box<T> that can store any object type and
retrieve it.
Use an array of objects to store details of mul ple Student objects.
Implement an interface Drawable and override it in mul ple shape
classes: Circle, Rectangle, etc.
Create a banking system with mul ple accounts, each with deposit,
withdraw, and interest features.
Create an interface ShapeOpera ons with methods for area and
perimeter and implement in 2-3 shape classes.
Implement a program where Manager and Developer are subclasses
of Employee. Each has its own bonus calcula on.
Create an applica on that demonstrates loose coupling using
interfaces.
Write a program that uses polymorphism to call overridden methods
from an array of objects.
Demonstrate mul ple interface implementa on in a single class with
meaningful methods.