Question: Assignment Instructions: 1 ) String format checker C + + A string is referred to as if it contains > 0 consecutive s followed by
"Assignment Instructions:
String format checker C
A string is referred to as if it contains consecutive s followed by consecutive s followed by consecutive s Your task is to accept an arbitrary string of any length where is even, and determine if it is of the form If it is then the output of the program is be Format is OK Otherwise the output is Format not acceptable.
For example, If the file exp.dat contains:
BBAABB
BBAAABB
The given the Linux prompt checkstringdat
The program XK output is:
Format is OK
Format not acceptable
Format not acceptable
Format not acceptable
BBAABB Format not acceptable
BBAAABB Format not acceptable
Notes:
The size of the input string is not bounded
You cannot use ADTs you have to provide a complete set of classes and functions written from scratch for your implementation.
You have to use a queue implemented via a DYNAMIC LINKED LIST
You have to supply the functions, IsEmpty, Top, Push, Pop, and IsFull.
YOUR PROGRAM MUST COMPILE under g on Linux
Input to the program: Put a set of strings composed of English uppercase characters in the input file, one string per line. The input file should be named exp.txt The name can be hardwired into your program.
The program reads one string at a time. Finds its length and determines its format compliance. It should produce an output file out.txt according to the assignment instructions.
Assume that the file might contain any uppercase English letter. Only strings of As and Bs of the form are valid. The Empty string file is invalid.
Your program can through an exception.
Submit the cpp code only. Preferred one file."
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
