Object Oriented Programing: Name System Id Instuctor Program Section
Object Oriented Programing: Name System Id Instuctor Program Section
SECTION II -A
ASSIGNMENT #1
Q#01
What is Jagged Array in Java? Example with
example.
Output
Q# 02
Write a program for printing area and perimeter of
triangle having sides as 3,4,5 units. Make a java
Class named as Triangle for this purpose. Use
appropriate data members.
Write a member function “Display” for calculation
and display these area and triangle.
Program
package SBT;
triangledata()
{
t_area=(a*c)/2f;
t_perimeter=a+b+c;
}
void display()
{
System.out.println("AREA of TRIANGLE is :"+t_area);
}
OUTPUT