Rational number expression evaluator, Computer Engineering

Assignment Help:

Develop a RPN rational number expression evaluator (REEval).

The learning objectives are:

  • improved procedural programming skills
  • improved confidence in designing and implementing applications involving ADTs
  • experience implementing and using simple data structures (Stacks)
  • understanding of the Reverse Polish Notation (RPN)
  • further experience with incremental development

The REEval (Rational Expression Evaluator) C application supports evaluation of reverse polish notation (RPN) expressions containing fractions (rational numbers). It supports the four basic operations.  

The evaluator reads a line containing a reverse polish notation expression to be evaluated, and outputs the result.

- Operands are input as positive fractions, like 2/3.  

  When the denominator value is 1, operands are input as integers giving the numerator value, e.g. 4.

- Operators may be +, -, *, :, =, s, or q (s to output the stack, q to quit the program).


Related Discussions:- Rational number expression evaluator

State in brief about the pseudo instruction, State in brief about the pseud...

State in brief about the pseudo instruction A pseudo instruction isn't a real instruction. CPU can't execute it. It often requires a complex architectural operation and if it w

Fifo discipline, You have been retained to examine how many check-in agents...

You have been retained to examine how many check-in agents should be used at a check-in counter for a big hotel. During normal business hours, customers arrive at a rate of about 2

Explain real time systems, Q. Explain Real time system? A real time sys...

Q. Explain Real time system? A real time system defines an interactive processing system with severe time limitations. A real-time system is used whenever there are rigid time

Define the resolution of externally defined symbols, Resolution of external...

Resolution of externally defined symbols is performed by Ans. By Linker resolution of externally defined symbols is performed.

Explain ones complement operator, One's Complement Operator: ~ The one'...

One's Complement Operator: ~ The one's complement operator, sometimes called the "bitwise complement" or "bitwise NOT" operator, produces the bitwise one's complement of its op

Determine the minimum configuration of the decoder, The following switching...

The following switching functions are to be implemented using a Decoder f 1   = ∑ m(1, 2, 4, 8, 10, 14)   f 2   = ∑ m(2, 5, 9, 11)   f 3   = ∑ m(2, 4, 5, 6, 7) The minimum configur

How dreamweaver work in layout view, Q. How Dreamweaver Work in Layout View...

Q. How Dreamweaver Work in Layout View? Dreamweaver has two visual design views-Standard view and Layout view. You will start by working in Layout view, which allows you to dra

Illustrate an object model for university system, An object model for unive...

An object model for university system Establishing relationship among various classes in the system is the primary activity. Here, we have a simple model of a University System

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