KEMBAR78
OOPJ LAB Assignament | PDF | Method (Computer Programming) | Class (Computer Programming)
0% found this document useful (0 votes)
12 views3 pages

OOPJ LAB Assignament

The document outlines a laboratory plan for the Object Oriented Programming course at Shree Swami Atmanand Saraswati Institute of Technology for the academic year 2025-26. It includes a list of 37 practical programming tasks that students are required to complete, covering various concepts in Java such as calculations, data structures, exception handling, and file operations. Each task specifies the programming objective and expected outcomes for the students to achieve.

Uploaded by

deter93084
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)
12 views3 pages

OOPJ LAB Assignament

The document outlines a laboratory plan for the Object Oriented Programming course at Shree Swami Atmanand Saraswati Institute of Technology for the academic year 2025-26. It includes a list of 37 practical programming tasks that students are required to complete, covering various concepts in Java such as calculations, data structures, exception handling, and file operations. Each task specifies the programming objective and expected outcomes for the students to achieve.

Uploaded by

deter93084
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/ 3

SHREE SWAMI ATMANAND SARASWATI

INSTITUTE OF TECHNOLOGY
INTEGRATED M.SC IT DEPARTMENT

Laboratory Plan
Subject Name & Code: Object Oriented Programming – I (1330505)
Class: IMSC IT 2nd Year (3rd Semester-21)
Academic Year: 2025-26

Sr.
Practical aim Date Signature
No.
1. Write a Program that displays Welcome to Java, Learning Java Now and
Programming is fun.
2. Write a program that solves the following equation and displays the value x and
y:
1) 3.4x+50.2y=44.5 2) 2.1x+.55y=5.9 (Assume Cramer’s rule to solve
equation
ax+by=e x=ed-bf/ad-bc
cx+dy=f y=af-ec/ad-bc )
3. Write a program that reads a number in meters, converts it to feet, and
displays the result.
4. Body Mass Index (BMI) is a measure of health on weight. It can be calculated
by taking your weight in kilograms and dividing by the square of your height
in meters. Write a program that prompts the user to enter a weight in pounds
and height in inches and displays the BMI.
Note:- 1 pound=.45359237 Kg and 1 inch=.0254 meters.
5. Write a program that prompts the user to enter three integers and display the
integers in decreasing order.
6. Write a program that prompts the user to enter a letter and check whether a
letter is a vowel or consonant.
7. Write a Java application which takes several command line arguments,
which are supposed to be names of students and prints output as given
below: (Suppose we enter 3 names then output should be as follows)
Number of arguments = 3
1 Name is = Tom
2 Name is = Dick
3 Name is = Harry
8. Write a java program to print factorial of a number.(In command line argument
plz enter the value at the time of running the class)
9. Write a java program which takes several command line arguments in integer
form and sort this data using Arrays.sort() method and show this sorted data
with use of Arrays.tostring() method.
10. Write a program that reads an integer and displays all its smallest factors in
increasing order. For example if input number is 120, the output should be
as follows:2,2,2,3,5.
11. Write a java program to check palindrome number.
12. Write a java program to check Armstrong number.
13. Write a java program to display array data using for each loop.
14. Write a method with following method header.
public static int gcd(int num1, int num2)
Write a program that prompts the user to enter two integers and compute the
gcd of two integers.
15. Write a test program that prompts the user to enter ten numbers, invoke a
method to reverse the numbers, display the numbers.
16. Write a program that generate 6*6 two-dimensional matrix, filled with 0’s and
1’s , display the matrix, check every raw and column have an odd number’s of
1’s.
17. Write a program that creates a Random object with seed 1000 and displays the
first 100 random integers between 1 and 49 using the NextInt (49) method.
18. Write a program for calculator to accept an expression as a string in which the
operands and operator are separated by zero or more spaces.
For ex: 3+4 and 3 + 4 are acceptable expressions.
19. Write a program that creates an Array List and adds a Loan object , a
Date object , a string, and a Circle object to the list, and use a loop to
display all elements in the list by invoking the object’s to String()
method.
20. Write a program in Java to demonstrate use of this keyword.
21. Create a class “Student” that would contain enrollmentNo, name, and gender
as data members. Create appropriate getter and setter methods for the
“Student” class and constructors to initialize the data members. Also
demonstrate constructor chaining.
22. Write a java program static block which will be executed before main ( )
method in a class.
23. Write programs in Java to use Wrapper class of each primitive data types
24. Write a program to create a class Student with data ‘name, city and age’ along
with method printData to display the data. Create the two objects s1 ,s2 to
declare and access the values.
25. WAP using parameterized constructor with two parameters id and name.
While creating the objects obj1 and obj2 passed two arguments so that this
constructor gets invoked after creation of obj1 and obj2
26. Create a class Vehicle with data member vehicle_type. Inherit the class in a
class called car with data member model_type, company name etc. display
the information of the vehicle by defining the display function in both super
and sub class [ Method Overriding].
27. Write a java program to illustrates how to access a hidden variable. Class
A declares a static variable x. The class B extends A and declares an
instance variable x. display ( )method in B displays both of these variables
28. Write a program in java to demonstrate the use of ‘final’ keyword in the field
declaration . How it is accessed using object.
29. Write a small application in java to develop Banking Application in which
user deposits the amount Rs 1000.00 and then start withdrawing of Rs 400.00,
Rs 300.00ad it throws exception “Not sufficient fund” when user withdrawn
Rs 500 thereafter.
30. Write a program in java to develop user defined exception for 'Divide by Zero' error
31. Write the bin2Dec (string binary String) method to convert a binary string
into a decimal number. Implement the bin2Dec method to throw a
NumberFormatException if the string is not a binary string.
32. Describe abstract class called Shape which has three subclasses say
Triangle,Rectangle, and Circle. Define one method area () in the abstract class
and override this area () in these three subclasses to calculate for specific
object i.e. area () of Triangle subclass should calculate area of triangle etc.
Same for Rectangle and Circle.
33. Write a java program to implement an interface called Exam with a method
Pass (int mark) that returns a boolean. Write another interface called
Classify with a method Division (int average) which returns a String. Write
a class called Result which implements both Exam and Classify. The Pass
method should return true if the mark is greater than or equal to 50 else
false. The Division method must return “First” when the parameter average
is 60 or more, “Second” when average is 50 or more but below 60, “No
division” when average is less than 50.
34. Write a java program to illustrate use of standard input stream to read the user
input.
35. Write a program in Java to create, write, modify, read operations on a Text
file.
36. Write a java program to demonstrate the way contents are read from a file.
37. Write a java program to first check the existence of the specified file. If the
file exists, the data is written to the file through the object of the
FileOutputStream class.

You might also like