Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I will fail if the answer is wrong. Please help me To clarify the writing in the picture Don't use generic. In addition to reading

I will fail if the answer is wrong. Please help me

image text in transcribed

To clarify the writing in the picture

Don't use generic. In addition to reading equations from the file, I would like you to add an option to read the equations from the user. You have to create a combo box with infix and postfix notations. When I select infix, that means you will allow me to read from the user infix stream, and then you have to print the conversion and the evalution in the same output area of the program such as (infix -> postfix -> evaluation). When I select postfix you have to allow me to input postfix stream, and then you have to print the conversion and the evalution in the same output area of the program such as (postfix -> prefix -> evaluation).

In this project, you will implement an equation processor application using linked stack and cursor array implementations of a linked list. The equation processor interface will look like the following: The equation file is a special text file that has a .242 extension. The equations in this file are in infix and/or postfix format. A typical equation file looks like the following: The equations file has to start with the tag and ends with the tag 242>. Within the start and end tags there are 1 or more sections. Section starts with

tag and ends with
tag. Within a section there are an optional infix and/or postfix sections. Infix starts with tag and ends with tag. Postfix starts with tag and ends with tag. Inside the infix/postfix sections you find 1 or more equations. Equation starts with tag and ends with tag. At start, the user has to click the Load button. The load button will open a file chooser to select an equation file. The selected file will be displayed in the label next to the load button (e.g. c:\data\DS- Proj2.242) and then the file contents will be loaded as shown in previous figure if the file is valid(e.g. tags are balanced) . Valid file: you need to check and indicate whether the file tags are balanced or not. Meaning that each start tag has an end tag and they are closed in order. Note: This can be done using a stack similar to the balanced delimiters in equations. In the Equation Section you need to load equations from the 1st section from the file. For Infix equations: do convert the infix to postfix and then evaluate it. For postfix equations: do convert the postfix to prefix and then evaluate it. As shown in the previous figure. Note: we didnt cover prefix in lectures. You need to study it by yourself. At last, the Prev and Next buttons will navigate through equation section. If you click the Next button, it will display the equations from the 2nd section in the file if exists and so on. If you click the Prev button, it will display the equations from the previous section in the file if exists. To make the project more interesting: We need you to implement the linked stack using a cursor array. You have to define 1 course array and within this cursor array you can create as many stacks as needed. Yahoooo!
5 + 30 5 + 3 * 4.5 ( 15 + 3 ) * ( 4 ^ 2 ) 2 30 4 * + 3 4 * 2 5 * + 12 3 - 4 + 5 6 * - 2.5 3 - 4 + 5 6 7 * + *

( 2 - 3 + 4 ) * ( 5 + 6 * 7 ) 2 - 3 + 4 - 5 * 6 10 2 8 * + 3 - 2 3 1.5 * + 9 -
242>

Modification to the project 1.Don't use generic. 2.In addition to reading equations from the file, I would like you to add an option to read the equations from the user. You have to create a combo box with infix and postfix notations. When I select infix, that means you will allow me to read from the user infix stream, and then you have to print the conversion and the evalution in the same output area of the program such as (infix -> postfix -> evaluation). When I select postfix you have to allow me to input postfix stream, and then you have to print the conversion and the evalution in the same output area of the program such as (postfix -> prefix -> evaluation). At start, the user has to click the Load button. The load button will open a file chooser to select an equation file. The selected file will be displayed in the label next to the load button (e.g. c:\data\DSProj2.242) and then the file contents will be loaded as shown in previous figure if the file is valid(e.g. tags are balanced) . - Valid file: you need to check and indicate whether the file tags are balanced or not. Meaning that each start tag has an end tag and they are closed in order. Note: This can be done using a stack similar to the balanced delimiters in equations. - In the Equation Section you need to load equations from the 1st section from the file. - For Infix equations: do convert the infix to postfix and then evaluate it. For postfix equations: do convert the postfix to prefix and then evaluate it. As shown in the previous figure. Note: we didn't cover prefix in lectures. You need to study it by yourself. - At last, the Prev and Next buttons will navigate through equation section. If you click the Next button, it will display the equations from the 2nd section in the file if exists and so on. If you click the Prev button, it will display the equations from the previous section in the file if exists. To make the project more interesting: - We need you to implement the linked stack using a cursor array. - You have to define 1 course array and within this cursor array you can create as many stacks as needed. Yahoooo

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

2. DO change any clerical or calculation errors.

Answered: 1 week ago