Object Oriented Programming with Java
Assignment 03 (UNIT2) Session 2024-25
Q1. Give example of method overloading and overriding. Demonstrate a JAVA Program of Multiple
inheritance using Interface. [CO2,L2]
Q2. Write a JAVA code to Create a class ‘rectangle’ that contains ‘length’ and ‘width’ as data members. From this class
derive a class named ‘box’ that has additional data member ‘depth’. The members of the class ‘rectangle’ should
consists of a constructor and a method area(). The ‘box’ should have a constructor. Write a program to implement
this.[CO2,L2]
Q3. Write a JAVA code to Create a base class to input ten numbers from user in the base class. The derived class
contains a method ‘showLarge ()’. Which displays maximum of ten numbers and a method ‘showSmall ()’ to display
minimum of ten numbers. Use constructors. [CO2,L2]
Q4. Write a JAVA code to Create a base class ‘Language’ and declare a method ‘speak()’ which needs to be overridden
in derived class ‘Marathi’, ‘Telagu’, ‘Odia’. [CO2,L2]
Q5. Write a JAVA code to demonstrate polymorphism by creating class BANK and a method home_loan_interest_rate()
which will be overridden by 4 derived classes ICICI(8.98%), SBI(7.61%), UBI(9%), UNION(8.02%). Calculate Loan
interest for amount 900000. [CO2,L2]
Submit By 8/4/25(NO EXTENSION) All Answer should be in PDF (Digital Form)