2014-09-17 HW4

posted Sep 17, 2014, 7:48 AM by Samuel Konstantinovich   [ updated Sep 17, 2014, 8:39 AM ]
1 Make a simple 'coordinate' class. 
a) It should include instance variables for x and y.
b) It should include methods to access and modify x and y individually. (4 methods)
c) It should include a method setxy() which allows you to modify both x and y at the same time.
d) It should include a method toString() which returns the coordinate as a string in the format:   (x,y)  e.g. "(2,13)" 

2)While writing the coordinate, write a 'demo' class to test it by accessing, modifying, and printing. This should be used to debuy as you write the code for the coordinate class, not after you finish the whole thing.

3) Zip your two java files together and submit on the homework server.
The files should NOT be in a sub folder inside the zip!

4) Read (or re-read) the linux tutorial that you were given in the notes on the 15th.