0% found this document useful (0 votes)
2 views1 page

Java Lab Assignment 5

The document outlines an assignment for an Object Oriented Programming lab using Java, dated 25/02/2026. It consists of eight programming tasks, including finding a missing and duplicate number in an array, analyzing library book issues, managing student marks, and creating various classes such as Student, Car, Circle, and BankAccount with specific functionalities. Each task emphasizes different aspects of OOP principles and Java programming.

Uploaded by

rathoreaditi1811
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)
2 views1 page

Java Lab Assignment 5

The document outlines an assignment for an Object Oriented Programming lab using Java, dated 25/02/2026. It consists of eight programming tasks, including finding a missing and duplicate number in an array, analyzing library book issues, managing student marks, and creating various classes such as Student, Car, Circle, and BankAccount with specific functionalities. Each task emphasizes different aspects of OOP principles and Java programming.

Uploaded by

rathoreaditi1811
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

Lab: Object Oriented Programming using Java

Date: 25/02/2026
Assignment -5

Q.1. A number array contains values from 1 to 20, but one number is missing and
another number is repeated. Write a program to find both the missing number
and the duplicate number.
Q.2. A library records the number of books issued each day for 15 days. Write a
program to determine which day had the highest issues, which day had the
lowest, and whether there exists a sequence of at least 3 days where the number
of books issued kept decreasing continuously.
Q.3. A university stores marks of 100 students in 3 internal tests in a 2-D array. Write
a program in Java to perform following:
a. Calculate best test (highest average marks)
b. Find topper of each test
c. Count number of students improving consistently (Test1 < Test2 < Test3)
d. Display sorted final averages
Q.4. Write a program in Java to create a class Student with attributes name and age.
Create one object, assign values, and print them.
Q.5. Write a program in Java to create a class Car with color and model. Create 2
objects and display their details.
Q.6. Write a program to create a class Circle with data member radius and methods
calculateArea() and calculateCircumference() to compute and display the area
and circumference of the circle.
Q.7. Write a program to create a class Student with data members name, rollNo, and
marks. Create a method to display student details and another method to
calculate grade based on marks.
Q.8. Write a program to create a class BankAccount with data members
accountNumber and balance. Write methods deposit() and withdraw() to update
and display balance.

You might also like