Question: Question II ( 4 0 points ) : Using the provided Stack class implementation in the lab, you will create a parser to Question II
Question II points: Using the provided Stack class implementation in the lab, you will create a parser to Question II points: Using the provided Stack class implementation in the lab, you will create a parser to identify a secret message hidden within another string. These secret messages are enclosed in curly braces within otherwise readable text eg "This sentence contains a terces message" The secret messages are just words in reverse, which we can use a stack to flip back into a readable format. Write a method decode that prints all secret messages between and characters. Below are some sample outputs.
tableInputExpected outputThis is SCI Data Structure,This is ICS Data StructureI am studying computer science at KFUPM,I am studying computer science at KFUPMtable avaJ and nohtyP are both powerfullanguages for developing apps and softwaretableJava and Python are both powerful languages fordeveloping apps and software
identify a secret message hidden within another string. These secret messages are enclosed in curly braces
within otherwise readable text eg "This sentence contains a terces message"The secret messages are just
words in reverse, which we can use a stack to flip back into a readable format. Write a method decode that
prints all secret messages between and characters. Below are some sample outputs.
Input Expected output
This is SCI Data Structure This is ICS Data Structure
I am studying computer science at KFUPM I am studying computer science at KFUPM
avaJ and nohtyP are both powerful
languages for developing apps and software
Java and Python are both powerful languages for
developing apps and software
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
