Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: please help me this question

  1. #1
    Junior Member
    Join Date
    Dec 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb please help me this question

    use java the Checking the Types of Triangle

    Requirements

    Given a set of (x, y) coordinates representing the vertices of triangles, write a Java program to check the types of all the triangles formed by selecting any three given vertices. The following shows an example displaying all possible triangles formed from 6 vertices.
    1. Write appropriate methods to do the following tasks, one method for each:

    - Given the coordinates of the two vertices of a side of a triangle, calculate its length.
    - Given the length of the three sides of a triangle, calculate its area.
    - Given the length of the three sides of a triangle, check if it is a valid triangle.
    - Given the length of the three sides of a triangle, check if it is right-angled.
    - Given the length of the three sides of a triangle, check if it is isosceles.
    - Given the length of the three sides of a triangle, check if it is scalene.

    2. Input the coordinates of the vertices of triangles from a text file. Each row represents the (x, y) coordinates of a vertex of a triangle, and the two coordinate integers should be read into two integer array representing the x and y coordinates of all vertices. The last row (999, 999) is used to indicate end-of-file and should not be used as formal data.

    An example input text file is shown below:

    vertices.txt
    -5 2
    0 2
    8 2
    8 -11
    4 2
    4 5
    999 999

    3. Using appropriate iterations to select all the triangles formed by choosing any three vertices inputted in (1).

    - For each triangle, check and display its types.

    - Find and display the triangle with maximum area and the one with minimum area. The format of the maximum and minimum area is having 2 decimal places only.

    the format of the output of the program is shown below
    point1 point2 point 3 Types of Triangle

    (-5,2) (0,2) (8,2) Non-triangle
    (-5,2) (0,2) (8,-11) Scalene

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: please help me this question

    What have you tried?
    Be sure to wrap all posted code in code tags.

    Do you have any specific java programming questions?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2019
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: please help me this question

    Sorry for this but I can't help you with this because I am looking for the some other help. Actually, I am looking for the some Informative Speech Topics for my speech and I found some good examples of this on topicsmill.com which is an online topic related website and I can choose any topic from this website for my work. I think it will be best for me because I can't trust every service.

Similar Threads

  1. Replies: 1
    Last Post: November 4th, 2013, 05:38 AM