Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

1. Discuss the potential legal issues that relate to training.

Answered: 1 week ago

Question

What is Aufbau's rule explain with example?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago