Data structure of different delimiters, JAVA Programming

In this experience you will make the neophyte Java programmer happy by solving, to a limited extent, an age-old problem in programming:  mismatched delimiters.  As we all know, every left bracket needs a matching right bracket and your program will attempt to check this by prompting the user for a string containing delimiter; for example {123456. When you hit ENTER your should report back that you are missing a right delimiter. In fact, your program will check for three possible delimiters: left or right braces {}, left or right parentheses () or left and right brackets []. The error message that will be returned if there is a mismatch depends on the problem. If the right delimiter is missing you will specify "missing right delimiter"; if the left delimiter is missing you will specify what is missing: {([and where in the string the error occurs. For example, iii} should return the following error: "error} at 4". This would indicate no left delimiter. If there are no problems return nothing; simply prompt for the next string until the use hits ENTER to stop the program. Examples: {[hhhhh} would generate missing right delimiter error. However, something such as}}}}} would generate "error :} at 0", "error :} at 1", error :} at 2 ", "error :} at 3 "and "error :} 4 ".

You must use a stack data structure to help you parse the delimiter.

Posted Date: 3/1/2013 8:07:25 AM | Location : United States







Related Discussions:- Data structure of different delimiters, Assignment Help, Ask Question on Data structure of different delimiters, Get Answer, Expert's Help, Data structure of different delimiters Discussions

Write discussion on Data structure of different delimiters
Your posts are moderated
Related Questions
Java expert with tomcat tuning experience needed Project Description: Want a Java expert to fix memory issues with tomcat. I need School java project - Threads Programm

I want Linux server expert with Tomcat skills Project Description: I want a Linux server expert to look in to an issue with my domain. It is down since three days as there is

What are the Design Goals of Java Massive growth of the Internet and World-Wide Web leads us to a completely new way of looking at development of software which can run on diff

What do mean by synchronized methods and synchronized statements ?

JavaScript supports the normal control structures: The conditionals if, if...else, & switch; The iterations for, while, do...while, break, & continue;

Java is Object oriented programme language Java is comprehensively OOP language with robust memory system Memory errors largely disappear due to safe pointers and garbage c

in java string is a

A Padovan string P(n) for a natural number n is defined as: P(0)=''X'' P(1)=''Y'' P(2)=''Z'' for a string characters ''X'',''Y'',''Z'' only,and given value of n,write a program th

For this assignment, you will simulate a file system. You will be neither creating files nor reading or writing disk files. Rather, you will have a simulation of a file system that