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

Define exception, Define exception. The term exception is used to trans...

Define exception. The term exception is used to transfer to any event that causes an interruption

Padovan string , A Padovan string P(n) for a natural number n is defined as...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

What is associative search, What is associative search? The cost of an ...

What is associative search? The cost of an associative cache is higher that the cost of a direct mapped cache due to the need to search all 128 bit tag patterns to verify wheth

Queue, A Queue is a FIFO ( rst in, rst out) data structure. Given the foll...

A Queue is a FIFO ( rst in, rst out) data structure. Given the following queue interface: public interface Queue { int size(); // current queue size boolean isEmpty(); //

What is race condition, What is Race condition? Race condition: The c...

What is Race condition? Race condition: The circumstances where several processes access - and manipulate shared data-concurrently. The last value of the shared data depends

Why we need web browser, Q. why we need Web Browser? A Web browser is s...

Q. why we need Web Browser? A Web browser is software program which allows you to easily display Web pages and navigate the Web. The first graphical browser, Mosaic, was develo

What is indirect addressing mode explain, Q. What is Indirect Addressing Mo...

Q. What is Indirect Addressing Mode explain? Indirect Addressing Mode In the indirect addressing modes operands employ registers to point to locations in memory. So it is

Java''s layout managers give over traditional windowing syste, Java uses la...

Java uses layout managers to lay out components in a consistent manner across all windowing platforms. As Java's layout managers aren't tied to absolute sizing and positioning, the

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