Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 }

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions