Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Requirements for the Transaction class: A private data field named as date (of D

ID: 3705751 • Letter: R

Question

Requirements for the Transaction class: A private data field named as date (of Date data type), representing the date of the transaction A private data field named as type (of char data type), representing the type of the transaction, such as "W" for withdrawal and "D" for deposit A private data field named as amount (of double data type), representing the amount of the transaction A private data field named as balance (of double data type), representing the balance of the account after A private data field named as description (of String data type), representing the description of the transaction .A constructor that creates an instance of the Transaction class with specified values of transaction type, amount, bolance, and description, and date of the transaction. Note: Instead of passing a Date object to the constructor, you should use the new operator inside the body of the constructor to pass a new Date instance to the date data field (as we did for the Account class in class) .Define the corresponding accessor (get) methods to access a transaction's date, type, amount, description, and the balance, i.e., you need to define 5 get methods. Define a toStringi) method which does not receive parameters but returns a String that summarizes the transaction details, including transaction type, amount, balance after transaction, description of the transaction, and transaction date. You can organize and format the returned String in your own way, but you must include all of the required information. Note: the purpose of the Transaction class is to document a banking transaction, i.e., when a transaction happens, you can use the transaction parameters to create an instance of the Transaction class. Requirements for the main class: To test the Transaction class, in the main method of your main class you need to do the following: Create two instances of the Transaction class that represent the following transactions: . transaction 1: type: deposit; amount: 50; balance: 1050; description: babysitting income transaction 2: type: withdraw; amount: 30; balance: 1020; description: tennis fee o o Call the toString method of the Transaction class to print out a summary of each transaction. . Check the rubric on Canvas. Save your work before closing the project (especially if you can't compile it). After you have closed the project from the project tab in NetBeans, zip the NetBeans project folder and submit the zipped folder through Canvas, Note: you will need this Transaction class for HW5.

Explanation / Answer

Hi Dear,

Please find my implementation.

I tried to answer all of your questions.

Output:

Type of Transaction: Deposit
Date of Tansaction: Thu Apr 12 05:34:08 IST 2018
Description: Babysitting Income
Balance: 1050.0
Amount: 50.0

Type of Transaction: Withdrawl
Date of Tansaction: Thu Apr 12 05:34:08 IST 2018
Description: Tennis Fee
Balance: 1020.0
Amount: 30.0


Process finished with exit code 0

Please DONT forgot to rate my answer. We are working hard for you Guys!!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote