SlideShare a Scribd company logo
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

Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
JinTaek Seo
 
openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3D
roxlu
 
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
arcotstarsports
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping Setup
Mark Kilgard
 
Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Getachew Ganfur
 
Advance features of C++
Advance features of C++Advance features of C++
Advance features of C++vidyamittal
 
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
proloyankur01
 
Class method
Class methodClass method
Class method
kamal kotecha
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
Jussi Pohjolainen
 
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 2022
Luciano 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 .docx
faithxdunce63732
 
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
eyezoneamritsar
 
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
Andrey 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;.pdf
aravlitraders2012
 
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
archanaemporium
 

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

Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
 
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
 
Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01
 
Advance features of C++
Advance features of C++Advance features of C++
Advance features of C++
 
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
 
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.pdf
anuradhasilks
 
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
anuradhasilks
 
x+12=1 x=12 .pdf
                     x+12=1 x=12                                    .pdf                     x+12=1 x=12                                    .pdf
x+12=1 x=12 .pdf
anuradhasilks
 
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
anuradhasilks
 
Li2S Solution Li2S .pdf
                     Li2S  Solution                     Li2S  .pdf                     Li2S  Solution                     Li2S  .pdf
Li2S Solution Li2S .pdf
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 
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
anuradhasilks
 

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

Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 

Recently uploaded (20)

Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 

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