Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mini Project 0 5 Processing transactions along with undo and redo In this mini project, you are asked to first implement and test a TransactionStack

Mini Project 05 Processing transactions along with undo and redo
In this mini project, you are asked to first implement and test a TransactionStack class and then use it to process the undo and redo requests of transactions to a bank account. Part I
The TransactionStack class definition has been provided for you in the "TransactionStack.h" file of the "Mini Project 05: Account Transactions" project. You are not allowed to make any changes to this file. Each item of a TransactionStack object is defined with the following structure:The TransactionStack class has one private data member.
The top_ data member is to point at the top transaction in the stack.
Here are more details about the functions you need to implement and test for the TransactionStack class. Make a copy of the Mini 05 Sample Run document and, as you make progress in implementing and testing the functions, capture related screenshots that demonstrate proper testing of related functions into the document. At the end, save the document in PDF and upload it to Canvas.
Transactionstack: : Transactionstack () ;
This member function is to create a TransactionStack object that holds no transaction. Initialize the top_ data member to nu11ptr.
void TransactionStack: :push(const string&, double);
This member function takes two parameters.
The first parameter indicates the transaction type, which would be either "deposit" or "withdraw".
The second parameter indicates the transaction amount.
It is expected to use values of the parameters to create a new Transactionstack object and push it to the stack as the new top of the stack.
ostream& operator(ostreams, const TransactionStack &);
This friend function is to overload the operator and display the transactions in the stack from top to bottom. You get to choose the format of the output.
Transactionstack: : Transactionstack () ;
This member function is to release all dynamically allocated memory associated with a
image text in transcribed

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

Data Visualization A Practical Introduction

Authors: Kieran Healy

1st Edition

0691181624, 978-0691181622

More Books

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago