Defining Printers Printing the Output
1)What is the purpose of the "private int x;" declaration in the Point class?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

2)What does the "private void setX(int xCoord)" method do?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

3)How can the value of the y-coordinate be accessed from outside the Point class?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

4)What is the purpose of the print() method?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

5)What will be the output of the code?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

6)Can the x and y coordinates be modified directly from outside the Point class?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

7)What is the access level of the setX() method?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

8)How are the x and y coordinates initialized when a new Point object is created?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

9)Can multiple Point objects have different x and y coordinates?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}
  

10)What is the significance of the main() method in the Driver class?
public class Point{
 private int x;
 private int y;
 private void setX(int xCoord) {
  this.x = xCoord;
 }
 private void setY(int yCoord) {
  this.y = yCoord;
 }
 private int getX() {
  return this.x;
 }
 private int getY() {
  return this.y;
 }
 private void print() {
  System.out.println("(" + this.x + "," + this.y+ ")");
 }
}
public class Driver {
 public static void main(String[]){
  Point p = new Point();
  p.setX(2);
  p.setY(3);
  p.print();
 }
}