Question: Write a Java program to read three points that can form a triangle and then to find the smallest upright rectangle containing the triangle. use

Write a Java program to read three points that can form a triangle and then to find the smallest upright rectangle containing the triangle. use non advanced methods bacsue i am a ne students and just trying to learn the basics.

this is what i have so far,

import java.util.Scanner;

public class HW2 {

public static void main(String[] args) { Scanner in = new Scanner ( System.in); double x1, x2, x3, y1, y2, y3; System.out.println("Enter first point of triangle (x,y): "); x1 = in.nextDouble(); y1 = in.nextDouble(); System.out.println("Enter second point of triangle (x,y) : "); x2 = in.nextDouble(); y2 = in.nextDouble(); System.out.println("Enter third point of triangle (x,y): "); x3 = in.nextDouble(); y3 = in.nextDouble();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!