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 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 resources in your
solutions. My version of displayStackwith 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 objects of the ArrayStack class. You may use the ArrayStack template
class from Module 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 brown fox jumped over the lazy dog
Vowel stack:
a
e
i
u
Digit stack:
Symbol stack:
Result:
In this program you will be using a LinkedStack to determine the highest value that Bitcoin
reached in a year span and the date. You may again choose to use the LinkedStack from Module
Resources
The input for this will come from this data file these are Bitcoin values approximately every months
beginning in February of :
bitCoinValuestackLab.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: $
Date of highest value: August
Repeat this process to find the lowest value and corresponding string.
Your output will look something like this:
Lowest value of Bitcoin: $
Date of lowest value: February
Deliverables:
ArrayStack.h
LinkedStack.h
Node.h dont change this file
StackInterface.h dont change this file
bitCoinValuestackLab,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
bitCoinValuestackLab.txt
February
August
February
August
February
August
February
August
February
August
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
