hi im confused about this question i have where i am supposed to write one line of code for a rectangles x and y coordinates in the form of (x,y)
here is the question:
Write a CoordinateTester program that constructs a Rectangle object
and then prints its coordinates in the format (x, y). You must use
the getX and getY methods. Also print the expected answer.
public class CoordinateTester
{
public static void main(String[] args)
{
Rectangle box = new Rectangle(10, 20, 30, 40) ;
if anyone could please help me out it will be greatly appreciated!
here is the question:
Write a CoordinateTester program that constructs a Rectangle object
and then prints its coordinates in the format (x, y). You must use
the getX and getY methods. Also print the expected answer.
public class CoordinateTester
{
public static void main(String[] args)
{
Rectangle box = new Rectangle(10, 20, 30, 40) ;
if anyone could please help me out it will be greatly appreciated!