You will write a tystack<8> class that implanentathe StackInterface usinga linked list. Your HyStack slass is reguired to use a private inner class inplenentation for the node of the lioked list called Node. In additioa te inplananting the netheda defined in StackIatertace your KyStack class nust override the tostring mathod defined in the Cbjuct claaa. tostring ahould retura the String reprnsentation of the current atate of Mystack. ror exnple, if ve created a new Mystack object and puahed 256, 1, 9, 20, and 2018 onto the stack, the toatring nethod chould return: "TOP: 2019 | 20 | 9| 1 | 256 |" Create another elass called InfixExpresionsvalustor. This class consiste of: publie statie doubleevaluateinfin (String infix, int l values) whiah takaa in an infix expresaioa and an aray of aunerie values. Implement thie infix expression ovaluatorusing the Mystack class that you wrote for part 1. The paeudocode for this is an RlackbeCard. Inpleneatation details for the InfixixprCssiorEvaluator class: Input. Several differentinfix expresione will be used to test your program. The ioput expressiona are in syebolie form (uaing the 1ettera a through ', for inatance, "a+b*c-9", vitboutthe doubie quotes Iaput. The characters, 'a Lhrough wili represeat synhola with valuna provided for ench eymibol. The values array providen valuen tor any variable nanes in the intix xpression. Index G provides the walue for a, 1 for b. ete. It the parentheres of a given expreseion are unbalanced. the program is expected to throw an IllegalstateRxception Output. The rexult of the expresion. You will adapt theimplenentation fron part 1 to use the BRIDGES SLAlemant clasa, inatead of the tyNode elasn. Thin elRR i naned MyBridgesstack.Along with all metbods defined in atackintertace, HybridgesstackE> must implementa public void nethed naned vioualize. The visualize nethod produces a DRIDGES VAL and shosld be used to generate BRIDGES Viaualiationa. Output. Weite nain nethed that wil1 exereise the atack operations and produce atandard output to the console. These atack operationa can be arbitrary, as leng as multiple calls push and pop are made. Use the BRIDGES visualizer to display the contents of the full stack, bafore any elenants are popped off .

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
You will vrite a tystack<> class that
implanentathe StackInterfacacE> uainga linked
lixt. Your Hystack ela in regui red to use
private inner class inplenentation for the
node of the lioked list called Node. In
addition te inplananting the netheda deficed
in StackInterface, your Kystack class nust
override the tostring mathod detined in the
Cbjuct clasa. tostring ahould retura the
String representasion of the ourrent atate of
Mystnck. ror exple, if ve created a new
Mystack objact and puahed
256, 1, 9, 20, and 2018
onto the stack, the toatring nethod should
return:
"TOP: 2019 I 20 | 9 | 1 | 256 |"
Create another class ealled
Infixixpressionkvalustor. This class consists
of:
publie statie doubleevalusteinfin (String
infix. int values)
whieh takaa in an iafN expressioa and an
array of aunerie values. Implement thie infix
expression ovaluatorusing the Mystack ciass
that you wrote for part 1. The paeudocode
for this i an Blackbeard. Implenentation
details for the Infixtxpressiortvaluator
class:
Input. Several differentinfix expressione
will be used to test your program. The input
expressicna are in syebolie form (uaing the
1atters 'a' through t', for inatance,
"a+b*c-9", vitbout the double quotes)
Iaput. The characters, 'a' Lhrough ' wili
represeat aynhola with valuna provided for
R unbe a WEC
ench eymbol. "he values array provides valuen
tor any variable nanes in the intix
xpression, Indan D provides the value for a,
1 for b. etc.
It the parentheres of a given expression are
unbalanced. the program is expected to throw
an IllegalStatelxception
Output, The reauls of the exRERERion.
You will adapt theimplenentation fron part 1
to usa the BRIDGES SLAlemant clasa, inatead
of the tyNode class. This class is naned
MyBridgesstack<E>.Along with all metbods
defined ia atackintertace, Mybridgesatack>
muxt implenent publie void nethed naned
vicualire. Tbe visualize nethod produces a
DRIDGES UAL and shosld be used to generate
BRIDCES Viaualisasiona.
Output. Weitea naia ethed that vill
exercise the stack operatione and produce
atandard output to the console. These atack
operations can be arbitrary, as 1leng a
multiple calls push and pop are made
BRIDGES Visualizer to display the contents of
the full stack, bafore any elenants are
popped off.
.
Uge the
Transcribed Image Text:You will vrite a tystack<> class that implanentathe StackInterfacacE> uainga linked lixt. Your Hystack ela in regui red to use private inner class inplenentation for the node of the lioked list called Node. In addition te inplananting the netheda deficed in StackInterface, your Kystack class nust override the tostring mathod detined in the Cbjuct clasa. tostring ahould retura the String representasion of the ourrent atate of Mystnck. ror exple, if ve created a new Mystack objact and puahed 256, 1, 9, 20, and 2018 onto the stack, the toatring nethod should return: "TOP: 2019 I 20 | 9 | 1 | 256 |" Create another class ealled Infixixpressionkvalustor. This class consists of: publie statie doubleevalusteinfin (String infix. int values) whieh takaa in an iafN expressioa and an array of aunerie values. Implement thie infix expression ovaluatorusing the Mystack ciass that you wrote for part 1. The paeudocode for this i an Blackbeard. Implenentation details for the Infixtxpressiortvaluator class: Input. Several differentinfix expressione will be used to test your program. The input expressicna are in syebolie form (uaing the 1atters 'a' through t', for inatance, "a+b*c-9", vitbout the double quotes) Iaput. The characters, 'a' Lhrough ' wili represeat aynhola with valuna provided for R unbe a WEC ench eymbol. "he values array provides valuen tor any variable nanes in the intix xpression, Indan D provides the value for a, 1 for b. etc. It the parentheres of a given expression are unbalanced. the program is expected to throw an IllegalStatelxception Output, The reauls of the exRERERion. You will adapt theimplenentation fron part 1 to usa the BRIDGES SLAlemant clasa, inatead of the tyNode class. This class is naned MyBridgesstack<E>.Along with all metbods defined ia atackintertace, Mybridgesatack> muxt implenent publie void nethed naned vicualire. Tbe visualize nethod produces a DRIDGES UAL and shosld be used to generate BRIDCES Viaualisasiona. Output. Weitea naia ethed that vill exercise the stack operatione and produce atandard output to the console. These atack operations can be arbitrary, as 1leng a multiple calls push and pop are made BRIDGES Visualizer to display the contents of the full stack, bafore any elenants are popped off. . Uge the
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Operations of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education