| Transaction Class |
Namespace: Algs4Net
public class Transaction : IComparable<Transaction>
The Transaction type exposes the following members.
| Name | Description | |
|---|---|---|
| Transaction(String) |
Initializes a new transaction by parsing a string of the form NAME DATE AMOUNT. | |
| Transaction(String, DateTime, Double) |
Initializes a new transaction from the given arguments. |
| Name | Description | |
|---|---|---|
| Amount |
Returns the amount of this transaction. | |
| When |
Returns the date of this transaction. | |
| Who |
Returns the name of the customer involved in this transaction. |
| Name | Description | |
|---|---|---|
| CompareTo |
Compares two transactions by amount. | |
| Equals |
Compares this transaction to the specified object. (Overrides ObjectEquals(Object).) | |
| GetHashCode |
Returns a hash code for this transaction. (Overrides ObjectGetHashCode.) | |
| MainTest |
Demo test the Transaction data type. | |
| ToString |
Returns a string representation of this transaction. (Overrides ObjectToString.) |
This class is a C# port from the original Java class Transaction implementation by Robert Sedgewick and Kevin Wayne.