Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package eecs1022.lab5;
- /**
- * Created by user on 3/14/18.
- */
- public class Transaction {
- String transactionType;
- double amount;
- //Transaction Constructor
- public Transaction(String transactionType, double amount){
- this.transactionType = transactionType;
- this.amount = amount;
- }
- //toString Method
- @Override
- public String toString() {
- String s = "Transaction " + transactionType + ": $" + String.format("%.2f", amount);
- return s;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement