0% found this document useful (0 votes)
2 views

Practical_Index

The document outlines a series of practical programming assignments for an Object Oriented Programming course, focusing on Java. It includes tasks such as displaying messages, solving equations, converting units, calculating BMI, sorting arrays, implementing stacks, and demonstrating method and constructor overloading. Additionally, it covers class inheritance and interface implementation with examples of robot classes and their functionalities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Practical_Index

The document outlines a series of practical programming assignments for an Object Oriented Programming course, focusing on Java. It includes tasks such as displaying messages, solving equations, converting units, calculating BMI, sorting arrays, implementing stacks, and demonstrating method and constructor overloading. Additionally, it covers class inheritance and interface implementation with examples of robot classes and their functionalities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Subject : Object Oriented Programming - 1

Subject Code: 3140705

Sr. Practical 1 CO Date Marks Sign


No. out of 10
1.1 Write a Program that displays Welcome to Java, Learning Java Now CO1
and Programming is fun.
1.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-bccx+dy=f
y=af-ec/ad-bc )
1.3 Write a program that reads a number in meters, converts it to feet,
and displays the result.
1.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.
1.5 Write a program that prompts the user to enter three integers and
display the integers in decreasing order.
Practical 2
2.1 Write a program for sorting an elements in array, and enter elements CO1
by command line argument
2.2 Write a program to implement growable stack
2.3 Write a program that prompts the user to enter a letter and check
whether a letter is a vowel or constant
2.4 Write a program for calculator to accept an expression as a string in
which the operands and operator are separated by spaces. For ex: 3
+4
Practical-3
3.1 Write a program to perform method overloading of area method to CO2
find area of rectangle and square
3.2 Do above program using constructor overloading.
3.3 Create a class student with necessary properties, methods and
constructor. Overload a function name search in this class which
allows us to search student based on roll number, name and city.
Practical-4
4.1 Write a program that create following: a inherited by b,b inherited CO2
by c and c is inherited by d. a has one variable b has two and c has 3
variables. Use constructor and super to initialize the variables of
classes.
4.2 Write a Java program that combine several classes and interfaces
the abstract class robot has subclass name robotA, robotB, robotC.
Class robotA1 extends robotA. Class robotB1 and robotB2 extends
robotB. Class robotC1 extends robotC. The locomotion interface
declares three methods has forward, reverse and stop. It is
implemented by class robotB and robotC. The sound interface
declares one method named beep and it is implemented by robotA1,
robotB1 and robotC. Defined all class and implement interface as
specified than invoked beep method of all class object that are of
type sound.

You might also like