package Chapter1.Section2;

import edu.princeton.cs.algs4.*;

public class Transaction
{
    private final int month;
    private final int day;
    private final int year;
    private final int amount;

    public Transaction(int month, int day, int year, int amount)
    {
	this.month = month;
	this.day = day;
	this.year = year;
	this.amount = amount;
    }

    public int month() { return month; }
    public int day() { return day; }
    public int year() { return year; }
    public int amount() { return amount; }

    public String toString()
    {
	return month() + "/" + day() + "/" + year() + ": " + amount;
    }

    public boolean equals(Object x)
    {
	if (this == x) return true;
	if (x == null) return false;
	if (this.getClass() != x.getClass()) return false;

	Transaction that = (Transaction)x;

	return
	       that.month() == this.month()
	    && that.day() == this.day()
	    && that.year() == this.year()
	    && that.amount() == this.amount();
    }
}

@@ -184,19 +184,57 @@
 e final 
-int
+String customer;%0A    private final double
  amount;
@@ -258,16 +258,37 @@
 saction(
+%0A%09String customer, %0A%09
 int mont
@@ -290,16 +290,18 @@
  month, 
+%0A%09
 int day,
@@ -301,16 +301,18 @@
 nt day, 
+%0A%09
 int year
@@ -313,19 +313,24 @@
 t year, 
-int
+%0A%09double
  amount)
@@ -336,16 +336,55 @@
 )%0A    %7B%0A
+%09this.customer = new String(customer);%0A
 %09this.mo
@@ -590,19 +590,22 @@
  public 
-int
+double
  amount(
@@ -624,16 +624,78 @@
 mount; %7D
+%0A    public String customer() %7B return new String(customer); %7D
 %0A%0A    pu
@@ -726,24 +726,53 @@
    %7B%0A%09return
+ customer %0A%09    + %22 %22 %0A%09    +
  month() + %22
@@ -801,15 +801,26 @@
 r() 
+%0A%09    
 + %22
-:
  %22 
+%0A%09    
 + am
@@ -1174,16 +1174,64 @@
 amount()
+%0A%09    && that.customer().equals(this.customer())
 ;%0A    %7D%0A

Found the book's definition of Transaction