Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Calling all Java experts! I need help putting together a program with very strict directions as follows: VERY IMPORTANT: In addition to these strict requirements,

Calling all Java experts! I need help putting together a program with very strict directions as follows:

image text in transcribed

image text in transcribed

image text in transcribed

VERY IMPORTANT: In addition to these strict requirements, DO NOT FORGET to make sure that George account class instance is included in the main class, and that the ATM transactions incurred(meaning the ones that happen on a "logged in" id, not just a summary of all 10 ids) gets printed when terminating the program. Thank you in advance!

Instructions: This homework models after a banking situation with ATM machine. You are required to create three classes, Account, Transaction, and the main class (with the main method). Please closely follow the requirements below Requirements for the Transaction class: A private Date data field that stores the date of the transaction A private char data field for the type of the transaction, such as "W" for withdrawal and "D" for deposit A private double data field for the amount of the transaction A private double data field for the balance of the account after the transaction A private String data field for the description of the transaction A constructor that creates an instance of the Transaction class with specified values of transaction type, amount balance, 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 Define the corresponding accessor (get) methods to access a transaction's date, type, amount, description, and balance, i.e., you need to define 5 get methods. Define a toString() 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 Account class: A private int data field for the id of the account. A private String data field for the name of the customer A private double data field for the balance of the account. A private double data field for the annual interest rate. Key assumptions: (1) all accounts created following this class construct share the same interest rate. (2) while the annual interest rate is a percentage, e. g., 4.5%, users will just enter the double number as 4.5 (instead of 0.045) for simplicity. Therefore, you, the developer, need to divide the annual interest rate by 100 whenever you use it in a calculation A private Date data field that stores the account creating date A private ArrayList data field that stores a list of transactions for the account. Each element of this ArrayList must be an instance of the Transaction class defined above A no-arg constructor that creates a default account with default variable values A constructor that creates an instance of the Account class with a specified id and initial balance A constructor that creates an instance of the Account class with a specified id, name, and initial balance Note: for all constructors, 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 Define corresponding accessor (get) and mutator(set) methods to access and reset the account id, balance, and interest rate, i.e., you need to define 3 get methods and 3 set methods

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_2

Step: 3

blur-text-image_3

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

Understand the major components of a marketing plan.

Answered: 1 week ago

Question

What will you do or say to Anthony about this issue?

Answered: 1 week ago