View Single Post
  #1  
Old January 17, 2013, 04:51 PM
Jessica's Avatar
Jessica Jessica is offline
...
 
Join Date: Jun 2008
Location: PA
Posts: 8,187
Native Language: English, Chinese
Jessica is on a distinguished road
Java application

I'm taking a java course in college, and this is the second week...and I'm already having trouble understanding. My first application is not going well. I'm hoping to get some assistance. :/ I am completely 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


This is completely wrong, I know, but it's what I came up with. :/
Code:
package course.jzc22.lab01;

public class PointTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
			int myPoint; }
			public int X;
			public int Y;
			myPoint.X = 93;
			myPoint.Y = 67;
		public void getX (int X) {
			X = 
			System.out.println("Point");
	}

}
Reply With Quote