class Point { public int x; public int y; public Point(int px, int py) { this.x = px; this.y = py; } } Point p = new Point(3, 4); p.x p.y class Rectangle { public int width; public int height; public Rectangle(int w, int h) { this.width = w; this.height = h; } public int area() { return this.width * this.height; } public int perimeter() { return 2 * (this.width + this.height); } } Rectangle r = new Rectangle(5, 10); r.width r.height r.area() r.perimeter() class Counter { public int count; public Counter() { this.count = 0; } public void inc() { this.count++; } public void dec() { this.count--; } public int get() { return this.count; } } Counter c = new Counter(); c.get() %classes %whos %quit