Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class lab {
- public static void main(String[] args){
- Gurvaljin gurvaljin = new Gurvaljin(new Point(8,15), new Point(1,2), new Point(14,2));
- System.out.println("Talbai: " );
- System.out.println(String.valueOf(gurvaljin.getTalbai()));
- System.out.println("Undur: " );
- System.out.println(String.valueOf(gurvaljin.getUndur()));
- }
- }
- public class Gurvaljin
- {
- private Point pointA;
- private Point pointB;
- private Point pointC;
- public Gurvaljin(Point A, Point B, Point C)
- {
- this.pointA = A;
- this.pointB = B;
- this.pointC = C;
- }
- public float getTalbai()
- {
- float talbai = 0;
- return talbai;
- }
- public float getUndur()
- {
- float undur = 0;
- // http://www.teacherschoice.com.au/maths_library/trigonometry/triangle_given_3_points.htm
- // 3 цэгүүд мэдэгдэж байгаа бол суурь болон өнцөг олох
- // http://www.regentsprep.org/regents/math/algtrig/att13/areatriglesson.htm
- // суурь, өнцөг мэдэгдэж байгаа бол өндөр болон талбайг олох
- //float a =
- return undur;
- }
- public Point getPointA() {
- return this.pointA;
- }
- public Point getPointB() {
- return this.pointB;
- }
- public Point getPointB() {
- return this.pointB;
- }
- }
- public class Point
- {
- private float x;
- private float y;
- public Point(float x, float y)
- {
- this.x = x;
- this.y = y;
- }
- public int getX() {
- return this.x;
- }
- public int getY() {
- return this.y;
- }
- public void setX(int x) {
- this.x = x;
- }
- public void setY(int y) {
- this.y = y;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement