Question: NOT ADHERED TO . READ THROUGH THE ENTIRE LAB ASSIGNMENT BEFORE YOU BEGIN DESIGNING AND CODING You will demonstrate your understanding of stacks in this

NOT ADHERED TO.
READ THROUGH THE ENTIRE LAB ASSIGNMENT BEFORE YOU BEGIN DESIGNING
AND CODING
You will demonstrate your understanding of stacks in this exercise. There are 2 programs to be
completed. All files require Javadoc documentation comments at the top to include a description of
the program, the @file tag, and an @author tag with your name and Javadoc ALL functions and
methods. Class specification files include complete Javadoc documentation comments for all public
members. Good functional decomposition is expected. Consider one function to build the stacks, one
function to process the stacks. You will not be using vectors to store the data, although you may
consider using a vector to stpre the vowels, symbols and digits for comparison. You will not be using
structs anywhere in this program. You are not to add a Candy class to this project. You will not be
using the Stack class from the C++ STL.
NOTE WELL: For this assignment you may only use the following Stack functions (these are in the
StackInterface):
push()
pop()
peek()
isEmpty()
isFull()
You may NOT use the provided version of the displayStack() function from Module 6 resources in your
solutions. My version of displayStack()(with a traversal) was needed for demonstration purposes and
is not a standard stack function. You are, of course, welcome to write your own version of
displayStack() that uses a combination of peek() and pop() function calls. You are not to use structures
(keyword struct) for class definitions. You are to define all classes in their own source code files.
Write a program that uses an ArrayStack to store the vowels, digits and arithmetic symbols from
an input string. You will have 3 objects of the ArrayStack class. You may use the ArrayStack template
class from Module 6 Resources.
The input will come from the user - prompt your user for a line of text, push all vowels, digits and
symbol's from the input string onto their respective stacks. The stack may only contain one element of
each vowel and digit. Hint: How do you know if you've pushed an 'a' onto the stack already?
Display the stacks.
Calculate the result of the top two arithmetic symbols - if a '+' is on the top of the symbols stack, pop
two digits from the digits stack and add them, if the symbol is '*', multiply them and so on (you need to
account for any arithmetic operator). Calculate the first result from the top most arithmetic symbol,
use that result with the next arithmetic symbol and the next digit. Display the final result. Your input is
guaranteed to have at least three digits and at least two arithmetic symbols (although you should
handle the case where there are too few digits or symbols to process...)
A sample run might look like this (user input is in red)- remember that the last element pushed is the
first one out:
Input a string: The quick 1 brown 2 fox jumped 8 over the lazy dog +*.
Vowel stack:
0
a
e
i
u
Digit stack:
8
2
1
Symbol stack:
*
+
Result: 17
In this program you will be using a LinkedStack to determine the highest value that Bitcoin
reached in a 5-year span and the date. You may again choose to use the LinkedStack from Module 6
Resources
The input for this will come from this data file (these are Bitcoin values approximately every 6 months
beginning in February of 2020):
bitCoinValue-stackLab.txt darr
Consider this algorithm:
Open the input file
If the input file does not exist, exit the program
Read the first value
The highest value is the first value
Push the corresponding string value onto the stack
Read the rest of the data
If the next value is higher, clear the stack, push the new string, reset the highest
If the next value is the same as the highest, push the new string (the stack will only contain the
strings corresponding to the highest value)
Display the highest value and the corresponding strings
Your output should look something like this:
Highest value of Bitcoin: $60657.32
Date of highest value: August 9,2024
Repeat this process to find the lowest value and corresponding string.
Your output will look something like this:
Lowest value of Bitcoin: $99.34.43
Date of lowest value: February 9,2020
Deliverables:
ArrayStack.h
LinkedStack.h
Node.h (don't change this file)
StackInterface.h (don't change this file)
bitCoinValue-stackLab,txt
TheDriver.cpp (or another appropriate name for the file with main()- yes, one deliverable to
demonstrate both of the above - a menu is appreciated, but not required - make sure that what you
are demonstrating is clearly labeled, not just a
bunch of output statements with no labels)
bitCoinValue-stackLab.txt
February 9,2020
9934.43
August 9,2020
11892.80
February 14,2021
57539.95
August 15,2021
49321.65
February 13,2022
38431.38
August 14,2022
21534.12
February 12,2023
24327.64
August 13,2023
26189.58
February 18,2024
51733.24
August 9,2024
60657.32
NOT ADHERED TO . READ THROUGH THE ENTIRE LAB

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!