LINK FOR THE ASSIGNMENT [url removed, login to view]~lbaker/cosc2125/[url removed, login to view]
COSC 2125 Lab #7
Due Date: TBA uploaded to canvas a text file with all .java files included and output of Junit test and instructor's okay on working gui solution
For this assignment you are going to use one of your StackList interface and one of your StackListImpl classes from lab #6 . BE sure you change MAX_ELEMENTS in StackList to 100. The current value of 4, is NOT high enough.
Write a gui application that requires the user to input an expression in INFIX form and then display back the input Infix form expression and its corresponding POSTFIX form. Be sure the user can see both the infix and the resulting postfix format of the input. Examples of expressions converted from infix to postfix for use in testing.
Important: Your program SHOULD ASSUME the expression uses the operations +, -, * , /, and ^ for raise to a power. The variables in the expression may only be 1 character long, and should be a letter or a number only. If any invalid characters are found your program should return the string "Invalid infix string" as the result and display the original infix and that string as the result. Here is the algorithm for converting infix to postfix. And here are some good problems showing infix and postfix expressions to use to see if your code works well
To give you a set of methods to help you along, here is an interface, InfixToPostFixConversion, that your solution engine MUST implement:
public interface InfixToPostfixConversion
// returns the String user wants to convert to postfix
public String getInfixFromUser();
// takes infix string, converts to postfix format, returns string
// if invalid characters are found in string, returns "Invalid infix string"
public String convertToPostFix(String infix);
// places results for output for user to see, includes
// original infix and computed postfix strings nicely formatted
public void displayResults(String infix, String postfix);
Be sure to create this program so that it executes in a GUI. Here is a Gui interface Example. This means you will need to design the GUI so that it is easy to follow with appropriate buttons and other components. Be sure you have a button that starts the conversion and one that clears the infix and postfix display areas as well. Design your layout and widgets on paper before you begin any coding.
Post to Canvas under lab #7 in the assignments section: A text file, [url removed, login to view] containing your stack class .java file, your frame class .java file that runs this program. Also show the JUnit test output for testing your interface. And show me in lab, be sure I check off that I have seen your gui run and work as well as you turning in the console output of the JUnit test.
Project ID: 8838863
this is like Easy stuff to program brother wouldnt take more then a few minutes for me very easy give it to me u will recieve the Work Done with a Nice Gui in just 1 hour