Jess
January 17th, 2013, 12:13 PM
I have to create a java application and I'm utterly clueless :(
The Application:
Write a simple class called PointChecker that will
1) Declare a variable as a Point
2) Using the constructor that has two double parameters construct a point at location 93,67
3) Using the methods getX and getY and the System.out.print and println methods output the actual values that the created point contains
4) The output the expected values (what you expect to see)
5) Then using the translate method move the x coordinate 13 to the left (negative) and the Y value 7 down (positive).
6) Output values as described in steps 3 and 4
I've already created the project/class thing or whatever using Eclipse. I just need help, MAJOR help. Need to turn this in at the end of today.
this is what I have right now, which I know is completely and utterly wrong. So that's why I need help :/
package course.jzc22.lab01;
public class PointTester {
/**
* @param args
*/
public static void main(String[] args) {
public int Point;
double getX;
double getY;
public Point(X, Y); {
X = getX;
Y = getY;
}
Point myPoint = new Point (93, 67);
System.out.println("Point");
}
}
EDIT: forget it. I gave up and just turned it in.
The Application:
Write a simple class called PointChecker that will
1) Declare a variable as a Point
2) Using the constructor that has two double parameters construct a point at location 93,67
3) Using the methods getX and getY and the System.out.print and println methods output the actual values that the created point contains
4) The output the expected values (what you expect to see)
5) Then using the translate method move the x coordinate 13 to the left (negative) and the Y value 7 down (positive).
6) Output values as described in steps 3 and 4
I've already created the project/class thing or whatever using Eclipse. I just need help, MAJOR help. Need to turn this in at the end of today.
this is what I have right now, which I know is completely and utterly wrong. So that's why I need help :/
package course.jzc22.lab01;
public class PointTester {
/**
* @param args
*/
public static void main(String[] args) {
public int Point;
double getX;
double getY;
public Point(X, Y); {
X = getX;
Y = getY;
}
Point myPoint = new Point (93, 67);
System.out.println("Point");
}
}
EDIT: forget it. I gave up and just turned it in.