Question: I need help with this Java problem, thank you! TransactionType enum: public enum TransactionType { WITHDRAWAL, DEPOSIT } Introduction In this assignment you will practice

I need help with this Java problem, thank you!

TransactionType enum:

public enum TransactionType { WITHDRAWAL, DEPOSIT }

I need help with this Java problem, thank you! TransactionType enum: publicenum TransactionType { WITHDRAWAL, DEPOSIT } Introduction In this assignment you will

Introduction In this assignment you will practice Using Optional Using Predicate Using Lists Using Lambdas, Anonymous classes, and Inner classes Problem Description In this homework, you will create many useful classes for our end goal of making an ATM database! * Transaction o Keeps track of withdrawals/deposits from/into an account. Account o Keeps track of a list of Transactions for a customer You will be provided a Transaction Type enum. Solution Description Classes: Transaction o fields: TransactionType type double amount Optionalkstring> comment; (See link above for Optional documentation) o methods: Getter methods for all fields. boolean hasComment() should return true if comment is not empty, false otherwise o constructors: - one that takes in type and amount in that order and assigns them. Sets the comment to Optional.empty0 - one that takes in type and amount in that order and assigns them. Also take in a third parameter that is a String that represents that value of the comment. Properly initialize the comment field with this String Introduction In this assignment you will practice Using Optional Using Predicate Using Lists Using Lambdas, Anonymous classes, and Inner classes Problem Description In this homework, you will create many useful classes for our end goal of making an ATM database! * Transaction o Keeps track of withdrawals/deposits from/into an account. Account o Keeps track of a list of Transactions for a customer You will be provided a Transaction Type enum. Solution Description Classes: Transaction o fields: TransactionType type double amount Optionalkstring> comment; (See link above for Optional documentation) o methods: Getter methods for all fields. boolean hasComment() should return true if comment is not empty, false otherwise o constructors: - one that takes in type and amount in that order and assigns them. Sets the comment to Optional.empty0 - one that takes in type and amount in that order and assigns them. Also take in a third parameter that is a String that represents that value of the comment. Properly initialize the comment field with this String

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!