Click or drag to resize
Transaction Class
The Transaction class is an immutable data type to encapsulate a commercial transaction with a customer name, date, and amount.
Inheritance Hierarchy
SystemObject
  Algs4NetTransaction

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class Transaction : IComparable<Transaction>

The Transaction type exposes the following members.

Constructors
  NameDescription
Public methodTransaction(String)
Initializes a new transaction by parsing a string of the form NAME DATE AMOUNT.
Public methodTransaction(String, DateTime, Double)
Initializes a new transaction from the given arguments.
Top
Properties
  NameDescription
Public propertyAmount
Returns the amount of this transaction.
Public propertyWhen
Returns the date of this transaction.
Public propertyWho
Returns the name of the customer involved in this transaction.
Top
Methods
Remarks
For additional documentation, see Section 1.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

This class is a C# port from the original Java class Transaction implementation by Robert Sedgewick and Kevin Wayne.

See Also