Help with this C++ Data Structures Project Using good OOP, write a C++ program that will determine if a string has balanced delimiters.   Be sure to use good programming methodology and keep your project modular. Use private member functions and variables. Use public member functions for a constructor (where appropriate) and a driver method only. These specifications do not give a list of method names to be used. It is assumed the program will use several methods doing one task each. NOTE: Any submission that uses global variables or does not use a class and object appropriately will result in a project grade of 0. A string may use more than one type of delimiter to bracket information into blocks. For example, a string may use braces { }, parentheses ( ), and brackets [ ] as delimiters. A string is properly delimited if each right delimiter is matched with a preceding left delimiter of the same type in such a way that either the resulting blocks of information are disjoint, or one of them is completely nested within the other. Write a program that uses a single stack to check whether a string containing braces, parentheses, and brackets is properly delimited. Use input file string.txt as input to test your program. Each line in the input file is a string. If the string is properly delimited, display a message stating so. If it is not properly delimited, display a message stating so. For example, if the input file contains the following 3 lines of strings: if (a[i] > b[i]) while (c[index] < 0) { a++; b--; c[index++];} for ({int i = 0; num[i }]; would display the following output: Processing input file... String: 1. is properly delimited 2. is properly delimited 3. is not properly delimited End of file. Another input file Example called string.txt: if (denominator[x] == 0) cout << "ERROR: {Cannot divide by zero.\n}"; while (number[0] > number[1] ) { ((number[i]++; } num[i+1]--; )) for ((int j = 0; object[j + k]); j++) do { (x = x - 7;) { ((y = number + x) / 4) } }

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

Help with this C++ Data Structures Project

Using good OOP, write a C++ program that will determine if a string has balanced delimiters.  

Be sure to use good programming methodology and keep your project modular.

Use private member functions and variables.
Use public member functions for a constructor (where appropriate) and a driver method only.

These specifications do not give a list of method names to be used. It is assumed the program will use several methods doing one task each.

NOTE: Any submission that uses global variables or does not use a class and object appropriately will result in a project grade of 0.

A string may use more than one type of delimiter to bracket information into blocks. For example, a string may use braces { }, parentheses ( ), and brackets [ ] as delimiters.
A string is properly delimited if each right delimiter is matched with a preceding left delimiter of the same type in such a way that either the resulting blocks of information are disjoint, or one of them is completely nested within the other.

Write a program that uses a single stack to check whether a string containing braces, parentheses, and brackets is properly delimited.
Use input file string.txt as input to test your program.
Each line in the input file is a string. If the string is properly delimited, display a message stating so. If it is not properly delimited, display a message stating so.

For example, if the input file contains the following 3 lines of strings:

if (a[i] > b[i])
while (c[index] < 0) { a++; b--; c[index++];}
for ({int i = 0; num[i }];

would display the following output:

Processing input file...

String:
1. is properly delimited
2. is properly delimited
3. is not properly delimited

End of file.

Another input file Example called string.txt:

if (denominator[x] == 0) cout << "ERROR: {Cannot divide by zero.\n}";
while (number[0] > number[1] ) { ((number[i]++; } num[i+1]--; ))
for ((int j = 0; object[j + k]); j++)
do { (x = x - 7;) { ((y = number + x) / 4) } }

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Data members
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