import java.util.Objects;

/*
 * Represents a <x, y, z> point.
 */

public class ThreeDPoint
{
    public ThreeDPoint (int x, int y, int z)
    {
        _x = x;
        _y = y;
        _z = z;
    }

    protected ThreeDPoint (ThreeDPoint toCopy)
    {
        _x = toCopy._x;
        _y = toCopy._y;
        _z = toCopy._z;
    }

    public final int getX ()
    {
        return _x;
    }

    public final int getY ()
    {
        return _y;
    }

    public final int getZ ()
    {
        return _z;
    }

    @Override
    public String toString ()
    {
        return "ThreeDPoint < "+_x+", "+_y+", "+_z+" >";
    }
    
    @Override
    public int hashCode ()
    {
        return Objects.hash(_x, _y, _z);
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
        
        if (getClass() == obj.getClass())
        {
            ThreeDPoint temp = (ThreeDPoint) obj;

            return ((_x == temp._x) && (_y == temp._y) && (_z == temp._z));
        }

        return false;
    }

    protected int _x;
    protected int _y;
    protected int _z;
}
@@ -47,16 +47,19 @@
 %3Cx, y, z
+, w
 %3E point.
@@ -77,21 +77,20 @@
 c class 
-Three
+Four
 DPoint%0A%7B
@@ -101,21 +101,20 @@
  public 
-Three
+Four
 DPoint (
@@ -132,16 +132,23 @@
 y, int z
+, int w
 )%0A    %7B%0A
@@ -220,21 +220,20 @@
 ted 
-Three
+Four
 DPoint (
 Thre
@@ -228,21 +228,20 @@
 DPoint (
-Three
+Four
 DPoint t
@@ -321,24 +321,48 @@
  toCopy._z;%0A
+        _w = toCopy._w;%0A
     %7D%0A%0A    p
@@ -531,32 +531,93 @@
 turn _z;%0A    %7D%0A%0A
+    public final int getW ()%0A    %7B%0A        return _w;%0A    %7D%0A%0A
     @Override%0A  
@@ -666,21 +666,20 @@
 return %22
-Three
+Four
 DPoint %3C
@@ -701,16 +701,24 @@
 , %22+_z+%22
+, %22+_w+%22
  %3E%22;%0A   
@@ -810,16 +810,20 @@
 , _y, _z
+, _w
 );%0A    %7D
@@ -1058,21 +1058,20 @@
         
-Three
+Four
 DPoint t
@@ -1081,13 +1081,12 @@
  = (
-Three
+Four
 DPoi
@@ -1168,16 +1168,35 @@
 temp._z)
+ && (_w == temp._w)
 );%0A     
@@ -1296,9 +1296,31 @@
 int _z;%0A
+    protected int _w;%0A
 %7D

Update FourDPoint.java