// This class defines a blueprint for Point1 objects. // A new Point3 object can be created by calling: // Point1 p = new Point3(); // Point3 objects have two integer fields, x and y. // They can be accessed by using: // p.x // p.y // Point3 objects can also translate their values // you can do this by calling the translate method: // p.translate(4, 7); public class Point3 { //fields: data / information // Since these do not have the word "static" // it means they are part of the blueprint. // Every Point1 object will have an x and a y // value. The will be by default set to 0. int x; int y; //instance methods: behavoir / actions // Since this method does not have the word "static" // it means that it is part of the blueprint and // each Point3 that is made has a .translate() method. public void translate(int dx, int dy) { // This method gets called on some particular Point3 // object. Within the method, "this" refers to the // specific Point3 object that the .translate() method // was called on. this.x += dx; this.y += dy; } }