MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 1:
1. Design a class Vehicle with attributes brand, model, and price. Create a subclass
ElectricVehicle that includes batteryCapacity. Override a method displayDetails() in the
subclass.
2. Convert an array of String numbers to Integer using wrapper class, then find the second highest
number.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 2:
1. Create a class Box with overloaded constructors to initialize dimensions. Add a method to calculate
volume.
2. Create a 2D array of Double values to represent student scores. Use wrapper class to compute
average score per student.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 3:
1. Create a base class Account and subclasses SavingsAccount and CurrentAccount. Override the
withdraw() method with different rules.
2. Use an array of temperatures in Celsius, convert them to Fahrenheit and find the max and min using
Double wrapper class.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 4:
1. Create an interface Playable with a method play(). Implement it in two classes Guitar and Piano.
Demonstrate multiple inheritance by also using a Tunable interface.
2. Create a program that takes an array of prices, converts them to Double, sorts them, and searches for
a user-given price.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 5:
1. Create an abstract class Person with subclasses Student and Teacher. Use inheritance and method
overriding to print details.
2. Create a class to input an array of integers and use wrapper classes to find the sum and average.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 6:
1. Create interfaces Shape and Colorable. Implement both in a Circle class to demonstrate multiple
inheritance.
2. Write a program that searches for a specific number in a list of integers using Integer.valueOf()
and displays its index.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 7:
1. Create a package college with a class Student. Add another class Department that accesses
Student from another package.
2. Create a 3x3 matrix of Double values. Find the average of each row using wrapper class methods.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 8:
1. Create an interface EmployeeDetails with methods display() and calculateSalary().
Implement it in Manager and Developer.
2. Convert an array of marks into wrapper class objects. Sort and find how many students scored above
70.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 9:
1. Create a class Bank with overloaded deposit() methods for int and double.
2. Implement a program to take an array of string values and sort them after converting them into
integers.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 10:
1. Create a synchronized method withdraw() in a BankAccount class accessed by two threads.
2. Create an applet to display your name letter by letter using mouse clicks.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 11:
1. Write a program with a base class Polygon and subclasses Triangle, Rectangle, and Square. Each
should override the area() method.
2. Take a 1D array of doubles and find the temperature closest to a target input using Double wrapper
class.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 12:
1. Create an interface Animal and extend it with DomesticAnimal to add an eat() method. Implement
them in a Dog class.
2. Use wrapper class to convert an array of numeric strings to integers and calculate how many are
divisible by 5.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 13:
1. Create a class with constructor overloading for Book objects and display book details.
2. Find max and min product prices from a 2D array using Double wrapper class methods.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 14:
1. Create an applet that displays a digital clock using multithreading and changes background color
every 10 seconds.
2. Create a producer-consumer problem using wait() and notify() with a buffer of size 3.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 15:
1. Implement a multithreaded program to demonstrate inter-thread communication where one thread
prints time and another prints date every second.
2. Design an applet with dropdown to select shape color and draw shapes on mouse click.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 16:
1. Create a class Customer with constructor overloading. Create another class PremiumCustomer that
inherits it and overrides a discount() method.
2. Create an array of objects using Integer wrapper class and sort the array in descending order.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 17:
1. Create a package mathFunctions with classes Add, Subtract, Multiply, Divide. Use these classes
in another file to perform operations.
2. Create a class DataAnalyzer that takes array of numbers and finds median, mean, and mode using
wrapper classes.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 18:
1. Demonstrate multilevel inheritance using classes Person → Employee → Developer. Override a
method showDetails() in each.
2. Convert a string of comma-separated numbers into an array and compute their square roots using
wrapper class methods.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 19:
1. Extend two interfaces Sound and Movement in a class Cat with methods meow() and walk().
2. Create a program to convert Celsius to Fahrenheit using arrays and wrapper classes. Also, search the
user input in the array.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 20:
1. Create a program to allow only one user to access a resource at a time using synchronized blocks.
2. Develop a digital clock applet that updates every second and shows time in HH:MM:SS format.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 21:
1. Create a class Shape with subclasses Circle, Rectangle, and Square. Demonstrate inheritance and
constructor overloading.
2. Take an array of integer values and use wrapper classes to convert, reverse, and display the array.
MCA 2nd Semester Examination 2025
Paper Name: Object Oriented Programming Lab using JAVA Paper Code: MCAN 293
Question 22:
3. Create a class Employee with overloaded constructors. Subclass Manager adds a bonus attribute.
Override calculateSalary().
4. Convert a list of string-formatted numbers into integers using wrapper class and compute the sum of
even numbers.