Can you tell me if this is right please import java.lang.reflect.AnnotatedArrayType; /** * The class Point…

Homework Help Question & Answers

Can you tell me if this is right please import java.lang.reflect.AnnotatedArrayType; /** * The class Point

Can you tell me if this is right please

import java.lang.reflect.AnnotatedArrayType;

/**

* The class Point is a simple helper class that stares a 2 dimentional element on a grid

*

* @author Guy-Vincent Jourdan, University of Ottawa

*/

public class Point {

public int dot, row, col;

   // ADD YOUR INSTANCE VARIABLES HERE

/**

   * Constructor

   *

   * @param x

   * the x coordinate

   * @param y

   * the y coordinate

   */

public Point(int x, int y){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

this.row= x;

this.col= y;

}

/**

   * Getter method for the attribute x.

   *

   * @return the value of the attribute x

   */

public int getX(){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

return this.row;

}

/**

   * Getter method for the attribute y.

   *

   * @return the value of the attribute y

   */

public int getY(){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

return this.col;

}

/**

   * Setter for x and y.

   * @param x

   * the x coordinate

   * @param y

   * the y coordinate

   */

public void reset(int x, int y){

// REPLACE THE BODY OF THIS METHOD WITH YOUR OWN IMPLEMENTATION

}

}

0 0
Add a comment

GET HELP WITH YOUR PAPERS

GET THIS ANSWER FROM EXPERTS NOW

WhatsApp
Hello! Need help with your assignments? We are here
Don`t copy text!