Data structure of different delimiters, JAVA Programming

Assignment Help:

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.


Related Discussions:- Data structure of different delimiters

Tictactoe, write complete application to play game tictactoe

write complete application to play game tictactoe

What is jms administered object, A preconfigured JMS object (a resource man...

A preconfigured JMS object (a resource manager connection factory or a destination) formed by an administrator for the use of JMS clients and placed in a JNDI namespace

Difference between composition and aggregation, Aggregation Comp...

Aggregation Composition Aggregation :  An   association   in  which  one  class refers to collection or a another class. This is a part of  a  who

What is a framework, A framework is made up of the set of classes which per...

A framework is made up of the set of classes which permit us to use a library in a best possible way for a particular requirement.

What is java rmi, Remote Method Invocation (RMI) is the process of activati...

Remote Method Invocation (RMI) is the process of activating a method on a remotely running object. RMI offers location transparency in the sense that it gives the feel that a metho

What is an introduction in aop, An introduction permits the user to add new...

An introduction permits the user to add new methods or attributes to an existing class. This can then be explained to an existing class without having to change the structure of th

Java rmi client implement and web service client-side steps, What is the na...

What is the name of the services you have chosen? What do they do? What is the name of the publisher? Provide details if you are developing your own service(s). There are variou

Java and Arrays, AskWrite an application that uses an Array to store 10mess...

AskWrite an application that uses an Array to store 10messages of type String. You will store this Array with 10 messages of your choosing. For example, a message could be “I love

What is the use of wrapper class, What is the use of Wrapper class You...

What is the use of Wrapper class You can create an object of Wrapper class using a String or a primitive data type Integer num = new Integer (4); or Integer num = n

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd