In Java make a program that allows a user to input coordinates as to make a Hexagon via an array, and my professor has set the standards of: Write a class Polygon which draws a hexagon for a set of numbers given by the user. You must only use method drawLine of class Graphics (other fill or draw methods won't be accepted).
And so far I have, but I cannot seem to figure out how to set the Users input in a way that will transfer over to a Drawline Hexagon, any help would be much appreciated!
Note:For some reason whenever I use Chegg.com in Mozilla the questions are submitted many times without ever registering, yet who ever helps me with the question, surely I will reward both sets to points to them, as is possible
Here is the code that I have so far:
package Assignment8;
?
import java.awt.Graphics;
import java.util.Scanner;
import javax.swing.JApplet;
?
public class ggg extends JApplet{
{
int x,i;
Scanner scanner = new Scanner(System.in);
for(i = 0; i < 6; i++)
System.out.print("Please enter");
x = scanner.nextInt();
}
}
?