Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java TASK: Create a class called Transaction Manager with the following properties: It should have a private instance variable of type ArrayList called transactions

In javaimage text in transcribed

TASK: Create a class called Transaction Manager with the following properties: It should have a private instance variable of type ArrayList called transactions to keep track of transactions It must have a public no-parameter constructor that initializes its instance variables It must have a public method called addTransaction that has a double parameter called amount followed by a String parameter called description, and it should add a new Transaction object with amount for the amount and description for the description to the transactions instance variable It must also have an overloaded addTransaction method that only has one parameter of type double called amount, and it should add a new Transaction object with amount for the amount and "No description" for the description to the transactions instance variable It must have a public method called getTransactions that doesn't have parameters and that returns a copy of the transactions instance variable NOTE: Ignore the "Sample Input:" and "Sample Output:" sections immediately below this. They are always shown by Stepik, even if they're not used. The "CORRECT" message is something that is being used behind-the-scenes in the grading system

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

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

5 What does it mean to think of an organisation as an open system?

Answered: 1 week ago