SlideShare a Scribd company logo
1 of 18
Download to read offline
TriangleU210.java
public class TriangleU210 {
//Declaring instance variables
private double coodX1,coodY1,coodX2,coodY2,coodX3,coodY3;
//Default Constructor
public TriangleU210() {
this.coodX1=0;
this.coodY1=0;
this.coodX2=0;
this.coodY2=10;
this.coodX3=30;
this.coodY3=30;
}
//Parameterized constructor
public TriangleU210(double coodX1, double coodY1, double coodX2, double coodY2,
double coodX3, double coodY3) {
this.coodX1 = coodX1;
this.coodY1 = coodY1;
this.coodX2 = coodX2;
this.coodY2 = coodY2;
this.coodX3 = coodX3;
this.coodY3 = coodY3;
}
//Getters and setters
public double getCoodX1() {
return coodX1;
}
public void setCoodX1(double coodX1) {
this.coodX1 = coodX1;
}
public double getCoodY1() {
return coodY1;
}
public void setCoodY1(double coodY1) {
this.coodY1 = coodY1;
}
public double getCoodX2() {
return coodX2;
}
public void setCoodX2(double coodX2) {
this.coodX2 = coodX2;
}
public double getCoodY2() {
return coodY2;
}
public void setCoodY2(double coodY2) {
this.coodY2 = coodY2;
}
public double getCoodX3() {
return coodX3;
}
public void setCoodX3(double coodX3) {
this.coodX3 = coodX3;
}
public double getCoodY3() {
return coodY3;
}
public void setCoodY3(double coodY3) {
this.coodY3 = coodY3;
}
//This method will calculate the distance between the point
public double distance(double x1,double y1,double x2,double y2)
{
return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));
}
//This method will calculate the angle between the two points
public double angleOfPoints(double x1,double y1,double x2,double y2)
{
double xDiff=x2-x1;
double yDiff=y2-y1;
double angle=Math.atan2(yDiff, xDiff)*(180/Math.PI);
return angle;
}
//This method will calculate the area of the triangle
public double getArea()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
double S=(lengthA+lengthB+lengthC)/2;
//Calculating the area
double area=Math.sqrt(S*(S-lengthA)*(S-lengthB)*(S-lengthC));
return area;
}
//This method will calculate the Perimeter of the triangle
public double getPerimeter()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
//Calculating the perimter
double S=(lengthA+lengthB+lengthC);
return S;
}
//Displaying the triangle is isosceles triangle or not
public void Isosceles()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
if((lengthA==lengthB) || (lengthB==lengthC) || (lengthC==lengthA) )
{
System.out.println(":: The Triangle is Isosceles ::");
}
else
System.out.println(":: The Triangle is Not Isosceles ::");
}
//Displaying the triangle is Equilateral triangle or not
public void Equilateral()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
if((lengthA==lengthB) && (lengthB==lengthC) && (lengthC==lengthA) )
{
System.out.println(":: The Triangle is Equilateral ::");
}
else
System.out.println(":: The Triangle is Not Equilateral ::");
}
//Displaying the triangle is Scalene triangle or not
public void Scalene()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
if((lengthA!=lengthB) && (lengthB!=lengthC) && (lengthC!=lengthA) )
{
System.out.println(":: The Triangle is Scalene ::");
}
else
System.out.println(":: The Triangle is Not Scalene ::");
}
//Checking the triangle is right angled or not
public boolean RightTraingle()
{
double xDiff1=getCoodX2()-getCoodX1();
double yDiff1=getCoodY2()-getCoodY1();
double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI);
double xDiff2=getCoodX3()-getCoodX2();
double yDiff2=getCoodY3()-getCoodY2();
double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI);
double xDiff3=getCoodX1()-getCoodX3();
double yDiff3=getCoodY1()-getCoodY3();
double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI);
if(angleA==90 || angleB==90 || angleC==90)
return true;
else
return false;
}
//Checking the triangle is Acute angled or not
public boolean Acute()
{
double xDiff1=getCoodX2()-getCoodX1();
double yDiff1=getCoodY2()-getCoodY1();
double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI);
double xDiff2=getCoodX3()-getCoodX2();
double yDiff2=getCoodY3()-getCoodY2();
double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI);
double xDiff3=getCoodX1()-getCoodX3();
double yDiff3=getCoodY1()-getCoodY3();
double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI);
if(angleA<90 && angleB<90 && angleC<90)
return true;
else
return false;
}
}
_____________________________________________
MyMain.java
import java.text.DecimalFormat;
public class MyMain {
public static void main(String[] args) {
//DecimalFormat Object is used to format the number
DecimalFormat df=new DecimalFormat("#.##");
System.out.println("________Traingle#1________");
//Creating TriangleU210 class Object by passing parameters
TriangleU210 tri=new TriangleU210(2.5, 2, 4.2, 3,5, 3.5);
//Displaying the area of the triangle
System.out.println("Area of the Triangle :"+df.format(tri.getArea()));
//Displaying the perimeter of the triangle
System.out.println("Perimter of the Traingle :"+df.format(tri.getPerimeter()));
//calling the Equilateral() method on the TriangleU210 object
tri.Equilateral();
//calling the Isosceles() method on the TriangleU210 object
tri.Isosceles();
//calling the Scalene() method on the TriangleU210 object
tri.Scalene();
//calling the RightTraingle() method on the TriangleU210 object
boolean rbool=tri.RightTraingle();
if(rbool==true)
System.out.println(":: Triangle is Right Angled ::");
else
System.out.println(":: Triangle is Not Right Angled ::");
//calling the Acute() method on the TriangleU210 object
boolean abool=tri.Acute();
if(abool==true)
System.out.println(":: Triangle is Acute Angled ::");
else
System.out.println(":: Triangle is Not Acute Angled ::");
System.out.println("  ________Traingle#2________");
//Creating TriangleU210 class Object by passing parameters
TriangleU210 trione=new TriangleU210(-3, 2, 2, 1,-2, -3);
//Displaying the area of the triangle
System.out.println("Area of the Triangle :"+df.format(trione.getArea()));
//Displaying the perimeter of the triangle
System.out.println("Perimter of the Traingle :"+df.format(trione.getPerimeter()));
//calling the Equilateral() method on the TriangleU210 object
trione.Equilateral();
//calling the Isosceles() method on the TriangleU210 object
trione.Isosceles();
//calling the Scalene() method on the TriangleU210 object
trione.Scalene();
//calling the RightTraingle() method on the TriangleU210 object
boolean rbool1=tri.RightTraingle();
if(rbool1==true)
System.out.println(":: Triangle is Right Angled ::");
else
System.out.println(":: Triangle is Not Right Angled ::");
//calling the Acute() method on the TriangleU210 object
boolean abool1=tri.Acute();
if(abool==true)
System.out.println(":: Triangle is Acute Angled ::");
else
System.out.println(":: Triangle is Not Acute Angled ::");
System.out.println("  ________Traingle#3________");
//Creating TriangleU210 class Object by passing parameters
TriangleU210 tritwo=new TriangleU210(3, 0, 6, 0,4.5, -2.6);
//Displaying the area of the triangle
System.out.println("Area of the Triangle :"+df.format(tritwo.getArea()));
//Displaying the perimeter of the triangle
System.out.println("Perimter of the Traingle :"+df.format(tritwo.getPerimeter()));
//calling the Equilateral() method on the TriangleU210 object
tritwo.Equilateral();
//calling the Isosceles() method on the TriangleU210 object
tritwo.Isosceles();
//calling the Scalene() method on the TriangleU210 object
tritwo.Scalene();
//calling the RightTraingle() method on the TriangleU210 object
boolean rbool2=tri.RightTraingle();
if(rbool1==true)
System.out.println(":: Triangle is Right Angled ::");
else
System.out.println(":: Triangle is Not Right Angled ::");
//calling the Acute() method on the TriangleU210 object
boolean abool2=tri.Acute();
if(abool==true)
System.out.println(":: Triangle is Acute Angled ::");
else
System.out.println(":: Triangle is Not Acute Angled ::");
}
}
_____________________________________________
Output:
________Traingle#1________
Area of the Triangle :0.03
Perimter of the Traingle :5.83
:: The Triangle is Not Equilateral ::
:: The Triangle is Not Isosceles ::
:: The Triangle is Scalene ::
:: Triangle is Not Right Angled ::
:: Triangle is Acute Angled ::
________Traingle#2________
Area of the Triangle :12
Perimter of the Traingle :15.85
:: The Triangle is Not Equilateral ::
:: The Triangle is Isosceles ::
:: The Triangle is Not Scalene ::
:: Triangle is Not Right Angled ::
:: Triangle is Acute Angled ::
________Traingle#3________
Area of the Triangle :3.9
Perimter of the Traingle :9
:: The Triangle is Not Equilateral ::
:: The Triangle is Isosceles ::
:: The Triangle is Not Scalene ::
:: Triangle is Not Right Angled ::
:: Triangle is Acute Angled ::
________________________________________Thank You
Solution
TriangleU210.java
public class TriangleU210 {
//Declaring instance variables
private double coodX1,coodY1,coodX2,coodY2,coodX3,coodY3;
//Default Constructor
public TriangleU210() {
this.coodX1=0;
this.coodY1=0;
this.coodX2=0;
this.coodY2=10;
this.coodX3=30;
this.coodY3=30;
}
//Parameterized constructor
public TriangleU210(double coodX1, double coodY1, double coodX2, double coodY2,
double coodX3, double coodY3) {
this.coodX1 = coodX1;
this.coodY1 = coodY1;
this.coodX2 = coodX2;
this.coodY2 = coodY2;
this.coodX3 = coodX3;
this.coodY3 = coodY3;
}
//Getters and setters
public double getCoodX1() {
return coodX1;
}
public void setCoodX1(double coodX1) {
this.coodX1 = coodX1;
}
public double getCoodY1() {
return coodY1;
}
public void setCoodY1(double coodY1) {
this.coodY1 = coodY1;
}
public double getCoodX2() {
return coodX2;
}
public void setCoodX2(double coodX2) {
this.coodX2 = coodX2;
}
public double getCoodY2() {
return coodY2;
}
public void setCoodY2(double coodY2) {
this.coodY2 = coodY2;
}
public double getCoodX3() {
return coodX3;
}
public void setCoodX3(double coodX3) {
this.coodX3 = coodX3;
}
public double getCoodY3() {
return coodY3;
}
public void setCoodY3(double coodY3) {
this.coodY3 = coodY3;
}
//This method will calculate the distance between the point
public double distance(double x1,double y1,double x2,double y2)
{
return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));
}
//This method will calculate the angle between the two points
public double angleOfPoints(double x1,double y1,double x2,double y2)
{
double xDiff=x2-x1;
double yDiff=y2-y1;
double angle=Math.atan2(yDiff, xDiff)*(180/Math.PI);
return angle;
}
//This method will calculate the area of the triangle
public double getArea()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
double S=(lengthA+lengthB+lengthC)/2;
//Calculating the area
double area=Math.sqrt(S*(S-lengthA)*(S-lengthB)*(S-lengthC));
return area;
}
//This method will calculate the Perimeter of the triangle
public double getPerimeter()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
//Calculating the perimter
double S=(lengthA+lengthB+lengthC);
return S;
}
//Displaying the triangle is isosceles triangle or not
public void Isosceles()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
if((lengthA==lengthB) || (lengthB==lengthC) || (lengthC==lengthA) )
{
System.out.println(":: The Triangle is Isosceles ::");
}
else
System.out.println(":: The Triangle is Not Isosceles ::");
}
//Displaying the triangle is Equilateral triangle or not
public void Equilateral()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
if((lengthA==lengthB) && (lengthB==lengthC) && (lengthC==lengthA) )
{
System.out.println(":: The Triangle is Equilateral ::");
}
else
System.out.println(":: The Triangle is Not Equilateral ::");
}
//Displaying the triangle is Scalene triangle or not
public void Scalene()
{
double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2());
double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3());
double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1());
if((lengthA!=lengthB) && (lengthB!=lengthC) && (lengthC!=lengthA) )
{
System.out.println(":: The Triangle is Scalene ::");
}
else
System.out.println(":: The Triangle is Not Scalene ::");
}
//Checking the triangle is right angled or not
public boolean RightTraingle()
{
double xDiff1=getCoodX2()-getCoodX1();
double yDiff1=getCoodY2()-getCoodY1();
double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI);
double xDiff2=getCoodX3()-getCoodX2();
double yDiff2=getCoodY3()-getCoodY2();
double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI);
double xDiff3=getCoodX1()-getCoodX3();
double yDiff3=getCoodY1()-getCoodY3();
double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI);
if(angleA==90 || angleB==90 || angleC==90)
return true;
else
return false;
}
//Checking the triangle is Acute angled or not
public boolean Acute()
{
double xDiff1=getCoodX2()-getCoodX1();
double yDiff1=getCoodY2()-getCoodY1();
double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI);
double xDiff2=getCoodX3()-getCoodX2();
double yDiff2=getCoodY3()-getCoodY2();
double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI);
double xDiff3=getCoodX1()-getCoodX3();
double yDiff3=getCoodY1()-getCoodY3();
double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI);
if(angleA<90 && angleB<90 && angleC<90)
return true;
else
return false;
}
}
_____________________________________________
MyMain.java
import java.text.DecimalFormat;
public class MyMain {
public static void main(String[] args) {
//DecimalFormat Object is used to format the number
DecimalFormat df=new DecimalFormat("#.##");
System.out.println("________Traingle#1________");
//Creating TriangleU210 class Object by passing parameters
TriangleU210 tri=new TriangleU210(2.5, 2, 4.2, 3,5, 3.5);
//Displaying the area of the triangle
System.out.println("Area of the Triangle :"+df.format(tri.getArea()));
//Displaying the perimeter of the triangle
System.out.println("Perimter of the Traingle :"+df.format(tri.getPerimeter()));
//calling the Equilateral() method on the TriangleU210 object
tri.Equilateral();
//calling the Isosceles() method on the TriangleU210 object
tri.Isosceles();
//calling the Scalene() method on the TriangleU210 object
tri.Scalene();
//calling the RightTraingle() method on the TriangleU210 object
boolean rbool=tri.RightTraingle();
if(rbool==true)
System.out.println(":: Triangle is Right Angled ::");
else
System.out.println(":: Triangle is Not Right Angled ::");
//calling the Acute() method on the TriangleU210 object
boolean abool=tri.Acute();
if(abool==true)
System.out.println(":: Triangle is Acute Angled ::");
else
System.out.println(":: Triangle is Not Acute Angled ::");
System.out.println("  ________Traingle#2________");
//Creating TriangleU210 class Object by passing parameters
TriangleU210 trione=new TriangleU210(-3, 2, 2, 1,-2, -3);
//Displaying the area of the triangle
System.out.println("Area of the Triangle :"+df.format(trione.getArea()));
//Displaying the perimeter of the triangle
System.out.println("Perimter of the Traingle :"+df.format(trione.getPerimeter()));
//calling the Equilateral() method on the TriangleU210 object
trione.Equilateral();
//calling the Isosceles() method on the TriangleU210 object
trione.Isosceles();
//calling the Scalene() method on the TriangleU210 object
trione.Scalene();
//calling the RightTraingle() method on the TriangleU210 object
boolean rbool1=tri.RightTraingle();
if(rbool1==true)
System.out.println(":: Triangle is Right Angled ::");
else
System.out.println(":: Triangle is Not Right Angled ::");
//calling the Acute() method on the TriangleU210 object
boolean abool1=tri.Acute();
if(abool==true)
System.out.println(":: Triangle is Acute Angled ::");
else
System.out.println(":: Triangle is Not Acute Angled ::");
System.out.println("  ________Traingle#3________");
//Creating TriangleU210 class Object by passing parameters
TriangleU210 tritwo=new TriangleU210(3, 0, 6, 0,4.5, -2.6);
//Displaying the area of the triangle
System.out.println("Area of the Triangle :"+df.format(tritwo.getArea()));
//Displaying the perimeter of the triangle
System.out.println("Perimter of the Traingle :"+df.format(tritwo.getPerimeter()));
//calling the Equilateral() method on the TriangleU210 object
tritwo.Equilateral();
//calling the Isosceles() method on the TriangleU210 object
tritwo.Isosceles();
//calling the Scalene() method on the TriangleU210 object
tritwo.Scalene();
//calling the RightTraingle() method on the TriangleU210 object
boolean rbool2=tri.RightTraingle();
if(rbool1==true)
System.out.println(":: Triangle is Right Angled ::");
else
System.out.println(":: Triangle is Not Right Angled ::");
//calling the Acute() method on the TriangleU210 object
boolean abool2=tri.Acute();
if(abool==true)
System.out.println(":: Triangle is Acute Angled ::");
else
System.out.println(":: Triangle is Not Acute Angled ::");
}
}
_____________________________________________
Output:
________Traingle#1________
Area of the Triangle :0.03
Perimter of the Traingle :5.83
:: The Triangle is Not Equilateral ::
:: The Triangle is Not Isosceles ::
:: The Triangle is Scalene ::
:: Triangle is Not Right Angled ::
:: Triangle is Acute Angled ::
________Traingle#2________
Area of the Triangle :12
Perimter of the Traingle :15.85
:: The Triangle is Not Equilateral ::
:: The Triangle is Isosceles ::
:: The Triangle is Not Scalene ::
:: Triangle is Not Right Angled ::
:: Triangle is Acute Angled ::
________Traingle#3________
Area of the Triangle :3.9
Perimter of the Traingle :9
:: The Triangle is Not Equilateral ::
:: The Triangle is Isosceles ::
:: The Triangle is Not Scalene ::
:: Triangle is Not Right Angled ::
:: Triangle is Acute Angled ::
________________________________________Thank You

More Related Content

Similar to TriangleU210.javapublic class TriangleU210 {    Declaring inst.pdf

openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3Droxlu
 
need help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdfneed help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdfarcotstarsports
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupMark Kilgard
 
Advance features of C++
Advance features of C++Advance features of C++
Advance features of C++vidyamittal
 
Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Getachew Ganfur
 
Please follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdfPlease follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdfproloyankur01
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Palak Sanghani
 
Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Palak Sanghani
 
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...British Council
 
JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022Luciano Mammino
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docxfaithxdunce63732
 
C# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdfC# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdfeyezoneamritsar
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesAndrey Karpov
 
GameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdfGameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdfaravlitraders2012
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfarchanaemporium
 

Similar to TriangleU210.javapublic class TriangleU210 {    Declaring inst.pdf (18)

openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3D
 
need help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdfneed help with code I wrote. This code is a maze gui, and i need hel.pdf
need help with code I wrote. This code is a maze gui, and i need hel.pdf
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping Setup
 
Advance features of C++
Advance features of C++Advance features of C++
Advance features of C++
 
Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01
 
Please follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdfPlease follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdf
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]
 
Class method
Class methodClass method
Class method
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]
 
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
 
JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
 
C# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdfC# I need assitance on my code.. Im getting an error message Us.pdf
C# I need assitance on my code.. Im getting an error message Us.pdf
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' Mistakes
 
GameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdfGameOfLife.cs using System; using System.Collections.Generic;.pdf
GameOfLife.cs using System; using System.Collections.Generic;.pdf
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdf
 
Oop lecture9 13
Oop lecture9 13Oop lecture9 13
Oop lecture9 13
 

More from anuradhasilks

The Arrhenius Theory of acids and bases The theo.pdf
                     The Arrhenius Theory of acids and bases  The theo.pdf                     The Arrhenius Theory of acids and bases  The theo.pdf
The Arrhenius Theory of acids and bases The theo.pdfanuradhasilks
 
oxygen in air (O2) reacts with H2 when it burns .pdf
                     oxygen in air (O2) reacts with H2 when it burns  .pdf                     oxygen in air (O2) reacts with H2 when it burns  .pdf
oxygen in air (O2) reacts with H2 when it burns .pdfanuradhasilks
 
most of the hydrogens on the benzene were replace.pdf
                     most of the hydrogens on the benzene were replace.pdf                     most of the hydrogens on the benzene were replace.pdf
most of the hydrogens on the benzene were replace.pdfanuradhasilks
 
Li2S Solution Li2S .pdf
                     Li2S  Solution                     Li2S  .pdf                     Li2S  Solution                     Li2S  .pdf
Li2S Solution Li2S .pdfanuradhasilks
 
identical is the exact same, this is the top r.pdf
                     identical is the exact same, this is the top r.pdf                     identical is the exact same, this is the top r.pdf
identical is the exact same, this is the top r.pdfanuradhasilks
 
This is a nucleophilic substitution reaction that.pdf
                     This is a nucleophilic substitution reaction that.pdf                     This is a nucleophilic substitution reaction that.pdf
This is a nucleophilic substitution reaction that.pdfanuradhasilks
 
Sulfur is oxidized and nitrogen is reduced. .pdf
                     Sulfur is oxidized and nitrogen is reduced.      .pdf                     Sulfur is oxidized and nitrogen is reduced.      .pdf
Sulfur is oxidized and nitrogen is reduced. .pdfanuradhasilks
 
There is some data missing in the problem.The composition of the m.pdf
There is some data missing in the problem.The composition of the m.pdfThere is some data missing in the problem.The composition of the m.pdf
There is some data missing in the problem.The composition of the m.pdfanuradhasilks
 
at beginning flask has only NaOH pH = 14 + log [N.pdf
                     at beginning flask has only NaOH pH = 14 + log [N.pdf                     at beginning flask has only NaOH pH = 14 + log [N.pdf
at beginning flask has only NaOH pH = 14 + log [N.pdfanuradhasilks
 
take log on both sides1n lna = ln las a--0.pdf
take log on both sides1n lna = ln las a--0.pdftake log on both sides1n lna = ln las a--0.pdf
take log on both sides1n lna = ln las a--0.pdfanuradhasilks
 
Tested on Eclipse and both class should be in same packageimport.pdf
Tested on Eclipse and both class should be in same packageimport.pdfTested on Eclipse and both class should be in same packageimport.pdf
Tested on Eclipse and both class should be in same packageimport.pdfanuradhasilks
 
Solution A person in perfect health has a utility score of 1.0U.pdf
Solution A person in perfect health has a utility score of 1.0U.pdfSolution A person in perfect health has a utility score of 1.0U.pdf
Solution A person in perfect health has a utility score of 1.0U.pdfanuradhasilks
 
Resurgent infection is suggesting that it is viral infection by meas.pdf
Resurgent infection is suggesting that it is viral infection by meas.pdfResurgent infection is suggesting that it is viral infection by meas.pdf
Resurgent infection is suggesting that it is viral infection by meas.pdfanuradhasilks
 
There are only two functional groups in the molec.pdf
                     There are only two functional groups in the molec.pdf                     There are only two functional groups in the molec.pdf
There are only two functional groups in the molec.pdfanuradhasilks
 
PsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdf
PsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdfPsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdf
PsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdfanuradhasilks
 
Product of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdf
Product of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdfProduct of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdf
Product of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdfanuradhasilks
 
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdfOf the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdfanuradhasilks
 
C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf
                     C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf                     C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf
C2O2 is a bidendate ligand &Cl - is a mono dendat.pdfanuradhasilks
 
Insulin receptor signaling is represented by figure DEffect of hyp.pdf
Insulin receptor signaling is represented by figure DEffect of hyp.pdfInsulin receptor signaling is represented by figure DEffect of hyp.pdf
Insulin receptor signaling is represented by figure DEffect of hyp.pdfanuradhasilks
 

More from anuradhasilks (20)

The Arrhenius Theory of acids and bases The theo.pdf
                     The Arrhenius Theory of acids and bases  The theo.pdf                     The Arrhenius Theory of acids and bases  The theo.pdf
The Arrhenius Theory of acids and bases The theo.pdf
 
oxygen in air (O2) reacts with H2 when it burns .pdf
                     oxygen in air (O2) reacts with H2 when it burns  .pdf                     oxygen in air (O2) reacts with H2 when it burns  .pdf
oxygen in air (O2) reacts with H2 when it burns .pdf
 
x+12=1 x=12 .pdf
                     x+12=1 x=12                                    .pdf                     x+12=1 x=12                                    .pdf
x+12=1 x=12 .pdf
 
most of the hydrogens on the benzene were replace.pdf
                     most of the hydrogens on the benzene were replace.pdf                     most of the hydrogens on the benzene were replace.pdf
most of the hydrogens on the benzene were replace.pdf
 
Li2S Solution Li2S .pdf
                     Li2S  Solution                     Li2S  .pdf                     Li2S  Solution                     Li2S  .pdf
Li2S Solution Li2S .pdf
 
identical is the exact same, this is the top r.pdf
                     identical is the exact same, this is the top r.pdf                     identical is the exact same, this is the top r.pdf
identical is the exact same, this is the top r.pdf
 
This is a nucleophilic substitution reaction that.pdf
                     This is a nucleophilic substitution reaction that.pdf                     This is a nucleophilic substitution reaction that.pdf
This is a nucleophilic substitution reaction that.pdf
 
Sulfur is oxidized and nitrogen is reduced. .pdf
                     Sulfur is oxidized and nitrogen is reduced.      .pdf                     Sulfur is oxidized and nitrogen is reduced.      .pdf
Sulfur is oxidized and nitrogen is reduced. .pdf
 
There is some data missing in the problem.The composition of the m.pdf
There is some data missing in the problem.The composition of the m.pdfThere is some data missing in the problem.The composition of the m.pdf
There is some data missing in the problem.The composition of the m.pdf
 
at beginning flask has only NaOH pH = 14 + log [N.pdf
                     at beginning flask has only NaOH pH = 14 + log [N.pdf                     at beginning flask has only NaOH pH = 14 + log [N.pdf
at beginning flask has only NaOH pH = 14 + log [N.pdf
 
take log on both sides1n lna = ln las a--0.pdf
take log on both sides1n lna = ln las a--0.pdftake log on both sides1n lna = ln las a--0.pdf
take log on both sides1n lna = ln las a--0.pdf
 
Tested on Eclipse and both class should be in same packageimport.pdf
Tested on Eclipse and both class should be in same packageimport.pdfTested on Eclipse and both class should be in same packageimport.pdf
Tested on Eclipse and both class should be in same packageimport.pdf
 
Solution A person in perfect health has a utility score of 1.0U.pdf
Solution A person in perfect health has a utility score of 1.0U.pdfSolution A person in perfect health has a utility score of 1.0U.pdf
Solution A person in perfect health has a utility score of 1.0U.pdf
 
Resurgent infection is suggesting that it is viral infection by meas.pdf
Resurgent infection is suggesting that it is viral infection by meas.pdfResurgent infection is suggesting that it is viral infection by meas.pdf
Resurgent infection is suggesting that it is viral infection by meas.pdf
 
There are only two functional groups in the molec.pdf
                     There are only two functional groups in the molec.pdf                     There are only two functional groups in the molec.pdf
There are only two functional groups in the molec.pdf
 
PsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdf
PsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdfPsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdf
PsychoanalysisPsychoanalysis was founded by Sigmund Freud (1856-19.pdf
 
Product of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdf
Product of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdfProduct of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdf
Product of Cyclopentane + H2O(H+) gives No Reaction.It will simply F.pdf
 
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdfOf the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
 
C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf
                     C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf                     C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf
C2O2 is a bidendate ligand &Cl - is a mono dendat.pdf
 
Insulin receptor signaling is represented by figure DEffect of hyp.pdf
Insulin receptor signaling is represented by figure DEffect of hyp.pdfInsulin receptor signaling is represented by figure DEffect of hyp.pdf
Insulin receptor signaling is represented by figure DEffect of hyp.pdf
 

Recently uploaded

male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 

Recently uploaded (20)

male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 

TriangleU210.javapublic class TriangleU210 {    Declaring inst.pdf

  • 1. TriangleU210.java public class TriangleU210 { //Declaring instance variables private double coodX1,coodY1,coodX2,coodY2,coodX3,coodY3; //Default Constructor public TriangleU210() { this.coodX1=0; this.coodY1=0; this.coodX2=0; this.coodY2=10; this.coodX3=30; this.coodY3=30; } //Parameterized constructor public TriangleU210(double coodX1, double coodY1, double coodX2, double coodY2, double coodX3, double coodY3) { this.coodX1 = coodX1; this.coodY1 = coodY1; this.coodX2 = coodX2; this.coodY2 = coodY2; this.coodX3 = coodX3; this.coodY3 = coodY3; } //Getters and setters public double getCoodX1() { return coodX1; } public void setCoodX1(double coodX1) { this.coodX1 = coodX1; } public double getCoodY1() { return coodY1; } public void setCoodY1(double coodY1) { this.coodY1 = coodY1;
  • 2. } public double getCoodX2() { return coodX2; } public void setCoodX2(double coodX2) { this.coodX2 = coodX2; } public double getCoodY2() { return coodY2; } public void setCoodY2(double coodY2) { this.coodY2 = coodY2; } public double getCoodX3() { return coodX3; } public void setCoodX3(double coodX3) { this.coodX3 = coodX3; } public double getCoodY3() { return coodY3; } public void setCoodY3(double coodY3) { this.coodY3 = coodY3; } //This method will calculate the distance between the point public double distance(double x1,double y1,double x2,double y2) { return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2)); } //This method will calculate the angle between the two points public double angleOfPoints(double x1,double y1,double x2,double y2) { double xDiff=x2-x1; double yDiff=y2-y1; double angle=Math.atan2(yDiff, xDiff)*(180/Math.PI);
  • 3. return angle; } //This method will calculate the area of the triangle public double getArea() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); double S=(lengthA+lengthB+lengthC)/2; //Calculating the area double area=Math.sqrt(S*(S-lengthA)*(S-lengthB)*(S-lengthC)); return area; } //This method will calculate the Perimeter of the triangle public double getPerimeter() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); //Calculating the perimter double S=(lengthA+lengthB+lengthC); return S; } //Displaying the triangle is isosceles triangle or not public void Isosceles() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); if((lengthA==lengthB) || (lengthB==lengthC) || (lengthC==lengthA) ) { System.out.println(":: The Triangle is Isosceles ::"); } else
  • 4. System.out.println(":: The Triangle is Not Isosceles ::"); } //Displaying the triangle is Equilateral triangle or not public void Equilateral() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); if((lengthA==lengthB) && (lengthB==lengthC) && (lengthC==lengthA) ) { System.out.println(":: The Triangle is Equilateral ::"); } else System.out.println(":: The Triangle is Not Equilateral ::"); } //Displaying the triangle is Scalene triangle or not public void Scalene() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); if((lengthA!=lengthB) && (lengthB!=lengthC) && (lengthC!=lengthA) ) { System.out.println(":: The Triangle is Scalene ::"); } else System.out.println(":: The Triangle is Not Scalene ::"); } //Checking the triangle is right angled or not public boolean RightTraingle() { double xDiff1=getCoodX2()-getCoodX1(); double yDiff1=getCoodY2()-getCoodY1(); double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI); double xDiff2=getCoodX3()-getCoodX2(); double yDiff2=getCoodY3()-getCoodY2();
  • 5. double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI); double xDiff3=getCoodX1()-getCoodX3(); double yDiff3=getCoodY1()-getCoodY3(); double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI); if(angleA==90 || angleB==90 || angleC==90) return true; else return false; } //Checking the triangle is Acute angled or not public boolean Acute() { double xDiff1=getCoodX2()-getCoodX1(); double yDiff1=getCoodY2()-getCoodY1(); double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI); double xDiff2=getCoodX3()-getCoodX2(); double yDiff2=getCoodY3()-getCoodY2(); double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI); double xDiff3=getCoodX1()-getCoodX3(); double yDiff3=getCoodY1()-getCoodY3(); double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI); if(angleA<90 && angleB<90 && angleC<90) return true; else return false; } } _____________________________________________ MyMain.java import java.text.DecimalFormat; public class MyMain { public static void main(String[] args) { //DecimalFormat Object is used to format the number DecimalFormat df=new DecimalFormat("#.##");
  • 6. System.out.println("________Traingle#1________"); //Creating TriangleU210 class Object by passing parameters TriangleU210 tri=new TriangleU210(2.5, 2, 4.2, 3,5, 3.5); //Displaying the area of the triangle System.out.println("Area of the Triangle :"+df.format(tri.getArea())); //Displaying the perimeter of the triangle System.out.println("Perimter of the Traingle :"+df.format(tri.getPerimeter())); //calling the Equilateral() method on the TriangleU210 object tri.Equilateral(); //calling the Isosceles() method on the TriangleU210 object tri.Isosceles(); //calling the Scalene() method on the TriangleU210 object tri.Scalene(); //calling the RightTraingle() method on the TriangleU210 object boolean rbool=tri.RightTraingle(); if(rbool==true) System.out.println(":: Triangle is Right Angled ::"); else System.out.println(":: Triangle is Not Right Angled ::"); //calling the Acute() method on the TriangleU210 object boolean abool=tri.Acute(); if(abool==true) System.out.println(":: Triangle is Acute Angled ::"); else System.out.println(":: Triangle is Not Acute Angled ::"); System.out.println(" ________Traingle#2________");
  • 7. //Creating TriangleU210 class Object by passing parameters TriangleU210 trione=new TriangleU210(-3, 2, 2, 1,-2, -3); //Displaying the area of the triangle System.out.println("Area of the Triangle :"+df.format(trione.getArea())); //Displaying the perimeter of the triangle System.out.println("Perimter of the Traingle :"+df.format(trione.getPerimeter())); //calling the Equilateral() method on the TriangleU210 object trione.Equilateral(); //calling the Isosceles() method on the TriangleU210 object trione.Isosceles(); //calling the Scalene() method on the TriangleU210 object trione.Scalene(); //calling the RightTraingle() method on the TriangleU210 object boolean rbool1=tri.RightTraingle(); if(rbool1==true) System.out.println(":: Triangle is Right Angled ::"); else System.out.println(":: Triangle is Not Right Angled ::"); //calling the Acute() method on the TriangleU210 object boolean abool1=tri.Acute(); if(abool==true) System.out.println(":: Triangle is Acute Angled ::"); else System.out.println(":: Triangle is Not Acute Angled ::"); System.out.println(" ________Traingle#3________"); //Creating TriangleU210 class Object by passing parameters TriangleU210 tritwo=new TriangleU210(3, 0, 6, 0,4.5, -2.6);
  • 8. //Displaying the area of the triangle System.out.println("Area of the Triangle :"+df.format(tritwo.getArea())); //Displaying the perimeter of the triangle System.out.println("Perimter of the Traingle :"+df.format(tritwo.getPerimeter())); //calling the Equilateral() method on the TriangleU210 object tritwo.Equilateral(); //calling the Isosceles() method on the TriangleU210 object tritwo.Isosceles(); //calling the Scalene() method on the TriangleU210 object tritwo.Scalene(); //calling the RightTraingle() method on the TriangleU210 object boolean rbool2=tri.RightTraingle(); if(rbool1==true) System.out.println(":: Triangle is Right Angled ::"); else System.out.println(":: Triangle is Not Right Angled ::"); //calling the Acute() method on the TriangleU210 object boolean abool2=tri.Acute(); if(abool==true) System.out.println(":: Triangle is Acute Angled ::"); else System.out.println(":: Triangle is Not Acute Angled ::"); } } _____________________________________________ Output: ________Traingle#1________ Area of the Triangle :0.03 Perimter of the Traingle :5.83 :: The Triangle is Not Equilateral ::
  • 9. :: The Triangle is Not Isosceles :: :: The Triangle is Scalene :: :: Triangle is Not Right Angled :: :: Triangle is Acute Angled :: ________Traingle#2________ Area of the Triangle :12 Perimter of the Traingle :15.85 :: The Triangle is Not Equilateral :: :: The Triangle is Isosceles :: :: The Triangle is Not Scalene :: :: Triangle is Not Right Angled :: :: Triangle is Acute Angled :: ________Traingle#3________ Area of the Triangle :3.9 Perimter of the Traingle :9 :: The Triangle is Not Equilateral :: :: The Triangle is Isosceles :: :: The Triangle is Not Scalene :: :: Triangle is Not Right Angled :: :: Triangle is Acute Angled :: ________________________________________Thank You Solution TriangleU210.java public class TriangleU210 { //Declaring instance variables private double coodX1,coodY1,coodX2,coodY2,coodX3,coodY3; //Default Constructor public TriangleU210() { this.coodX1=0; this.coodY1=0; this.coodX2=0; this.coodY2=10;
  • 10. this.coodX3=30; this.coodY3=30; } //Parameterized constructor public TriangleU210(double coodX1, double coodY1, double coodX2, double coodY2, double coodX3, double coodY3) { this.coodX1 = coodX1; this.coodY1 = coodY1; this.coodX2 = coodX2; this.coodY2 = coodY2; this.coodX3 = coodX3; this.coodY3 = coodY3; } //Getters and setters public double getCoodX1() { return coodX1; } public void setCoodX1(double coodX1) { this.coodX1 = coodX1; } public double getCoodY1() { return coodY1; } public void setCoodY1(double coodY1) { this.coodY1 = coodY1; } public double getCoodX2() { return coodX2; } public void setCoodX2(double coodX2) { this.coodX2 = coodX2; } public double getCoodY2() { return coodY2; } public void setCoodY2(double coodY2) {
  • 11. this.coodY2 = coodY2; } public double getCoodX3() { return coodX3; } public void setCoodX3(double coodX3) { this.coodX3 = coodX3; } public double getCoodY3() { return coodY3; } public void setCoodY3(double coodY3) { this.coodY3 = coodY3; } //This method will calculate the distance between the point public double distance(double x1,double y1,double x2,double y2) { return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2)); } //This method will calculate the angle between the two points public double angleOfPoints(double x1,double y1,double x2,double y2) { double xDiff=x2-x1; double yDiff=y2-y1; double angle=Math.atan2(yDiff, xDiff)*(180/Math.PI); return angle; } //This method will calculate the area of the triangle public double getArea() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); double S=(lengthA+lengthB+lengthC)/2; //Calculating the area
  • 12. double area=Math.sqrt(S*(S-lengthA)*(S-lengthB)*(S-lengthC)); return area; } //This method will calculate the Perimeter of the triangle public double getPerimeter() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); //Calculating the perimter double S=(lengthA+lengthB+lengthC); return S; } //Displaying the triangle is isosceles triangle or not public void Isosceles() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); if((lengthA==lengthB) || (lengthB==lengthC) || (lengthC==lengthA) ) { System.out.println(":: The Triangle is Isosceles ::"); } else System.out.println(":: The Triangle is Not Isosceles ::"); } //Displaying the triangle is Equilateral triangle or not public void Equilateral() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); if((lengthA==lengthB) && (lengthB==lengthC) && (lengthC==lengthA) ) { System.out.println(":: The Triangle is Equilateral ::");
  • 13. } else System.out.println(":: The Triangle is Not Equilateral ::"); } //Displaying the triangle is Scalene triangle or not public void Scalene() { double lengthA=distance(getCoodX1(),getCoodY1(), getCoodX2(), getCoodY2()); double lengthB=distance(getCoodX2(),getCoodY2(), getCoodX3(), getCoodY3()); double lengthC=distance(getCoodX3(),getCoodY3(), getCoodX1(), getCoodY1()); if((lengthA!=lengthB) && (lengthB!=lengthC) && (lengthC!=lengthA) ) { System.out.println(":: The Triangle is Scalene ::"); } else System.out.println(":: The Triangle is Not Scalene ::"); } //Checking the triangle is right angled or not public boolean RightTraingle() { double xDiff1=getCoodX2()-getCoodX1(); double yDiff1=getCoodY2()-getCoodY1(); double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI); double xDiff2=getCoodX3()-getCoodX2(); double yDiff2=getCoodY3()-getCoodY2(); double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI); double xDiff3=getCoodX1()-getCoodX3(); double yDiff3=getCoodY1()-getCoodY3(); double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI); if(angleA==90 || angleB==90 || angleC==90) return true; else return false; } //Checking the triangle is Acute angled or not public boolean Acute()
  • 14. { double xDiff1=getCoodX2()-getCoodX1(); double yDiff1=getCoodY2()-getCoodY1(); double angleC=Math.atan2(yDiff1, xDiff1)*(180/Math.PI); double xDiff2=getCoodX3()-getCoodX2(); double yDiff2=getCoodY3()-getCoodY2(); double angleA=Math.atan2(yDiff2, xDiff2)*(180/Math.PI); double xDiff3=getCoodX1()-getCoodX3(); double yDiff3=getCoodY1()-getCoodY3(); double angleB=Math.atan2(yDiff3, xDiff3)*(180/Math.PI); if(angleA<90 && angleB<90 && angleC<90) return true; else return false; } } _____________________________________________ MyMain.java import java.text.DecimalFormat; public class MyMain { public static void main(String[] args) { //DecimalFormat Object is used to format the number DecimalFormat df=new DecimalFormat("#.##"); System.out.println("________Traingle#1________"); //Creating TriangleU210 class Object by passing parameters TriangleU210 tri=new TriangleU210(2.5, 2, 4.2, 3,5, 3.5); //Displaying the area of the triangle System.out.println("Area of the Triangle :"+df.format(tri.getArea())); //Displaying the perimeter of the triangle System.out.println("Perimter of the Traingle :"+df.format(tri.getPerimeter()));
  • 15. //calling the Equilateral() method on the TriangleU210 object tri.Equilateral(); //calling the Isosceles() method on the TriangleU210 object tri.Isosceles(); //calling the Scalene() method on the TriangleU210 object tri.Scalene(); //calling the RightTraingle() method on the TriangleU210 object boolean rbool=tri.RightTraingle(); if(rbool==true) System.out.println(":: Triangle is Right Angled ::"); else System.out.println(":: Triangle is Not Right Angled ::"); //calling the Acute() method on the TriangleU210 object boolean abool=tri.Acute(); if(abool==true) System.out.println(":: Triangle is Acute Angled ::"); else System.out.println(":: Triangle is Not Acute Angled ::"); System.out.println(" ________Traingle#2________"); //Creating TriangleU210 class Object by passing parameters TriangleU210 trione=new TriangleU210(-3, 2, 2, 1,-2, -3); //Displaying the area of the triangle System.out.println("Area of the Triangle :"+df.format(trione.getArea())); //Displaying the perimeter of the triangle System.out.println("Perimter of the Traingle :"+df.format(trione.getPerimeter())); //calling the Equilateral() method on the TriangleU210 object trione.Equilateral();
  • 16. //calling the Isosceles() method on the TriangleU210 object trione.Isosceles(); //calling the Scalene() method on the TriangleU210 object trione.Scalene(); //calling the RightTraingle() method on the TriangleU210 object boolean rbool1=tri.RightTraingle(); if(rbool1==true) System.out.println(":: Triangle is Right Angled ::"); else System.out.println(":: Triangle is Not Right Angled ::"); //calling the Acute() method on the TriangleU210 object boolean abool1=tri.Acute(); if(abool==true) System.out.println(":: Triangle is Acute Angled ::"); else System.out.println(":: Triangle is Not Acute Angled ::"); System.out.println(" ________Traingle#3________"); //Creating TriangleU210 class Object by passing parameters TriangleU210 tritwo=new TriangleU210(3, 0, 6, 0,4.5, -2.6); //Displaying the area of the triangle System.out.println("Area of the Triangle :"+df.format(tritwo.getArea())); //Displaying the perimeter of the triangle System.out.println("Perimter of the Traingle :"+df.format(tritwo.getPerimeter())); //calling the Equilateral() method on the TriangleU210 object tritwo.Equilateral(); //calling the Isosceles() method on the TriangleU210 object tritwo.Isosceles();
  • 17. //calling the Scalene() method on the TriangleU210 object tritwo.Scalene(); //calling the RightTraingle() method on the TriangleU210 object boolean rbool2=tri.RightTraingle(); if(rbool1==true) System.out.println(":: Triangle is Right Angled ::"); else System.out.println(":: Triangle is Not Right Angled ::"); //calling the Acute() method on the TriangleU210 object boolean abool2=tri.Acute(); if(abool==true) System.out.println(":: Triangle is Acute Angled ::"); else System.out.println(":: Triangle is Not Acute Angled ::"); } } _____________________________________________ Output: ________Traingle#1________ Area of the Triangle :0.03 Perimter of the Traingle :5.83 :: The Triangle is Not Equilateral :: :: The Triangle is Not Isosceles :: :: The Triangle is Scalene :: :: Triangle is Not Right Angled :: :: Triangle is Acute Angled :: ________Traingle#2________ Area of the Triangle :12 Perimter of the Traingle :15.85 :: The Triangle is Not Equilateral :: :: The Triangle is Isosceles :: :: The Triangle is Not Scalene ::
  • 18. :: Triangle is Not Right Angled :: :: Triangle is Acute Angled :: ________Traingle#3________ Area of the Triangle :3.9 Perimter of the Traingle :9 :: The Triangle is Not Equilateral :: :: The Triangle is Isosceles :: :: The Triangle is Not Scalene :: :: Triangle is Not Right Angled :: :: Triangle is Acute Angled :: ________________________________________Thank You