Java Homework - Stack Class

Completado Publicado Apr 13, 2014 Pagado a la entrega
Completado Pagado a la entrega

Using the [url removed, login to view] as a base, make a postfix boolean expression

evaluator program. This is very similar to the postfix integer

expression evaluator except the operands can only be true and false

and the operators are !, && and ||, (i.e. the three logical operators).

Example postfix boolean expressions:

true false &&

postfix for: true && false = false

true false ! &&

postfix for: true && !false = true

true true ! false || ! && true false && ||

postfix for: true && !(!true || false) || (true && false) = true

true !

postfix for: !true = false

true true false ! && || false || false false && true ! && || true ||

postfix for: true || true && !false || false || false && false && !true || true = true

true ! false && true false && || true ||

postfix for: !true && false || true && false || true = true

true false && ! true false true || && ||

postfix for: !(true && false) || true && (false || true) = true

true false && true false && || true || !

postfix for: !(true && false || true && false || true) = false

The program is analogous to the Postfix.java. The stack will contain Boolean objects.

You can use the code of Postfix, changing each Integer to Boolean

and each int to boolean (notice the capital letters).

! is a unary operator, so only the most recently pushed operand is

popped off the stack and has the ! operator applied to it.

Java

Nº del proyecto: #5799608

Sobre el proyecto

2 propuestas Proyecto remoto Activo Apr 13, 2014

Adjudicado a:

vano101

It looks like as pretty easy assignment, it's possible to complete it in few hours..........................

$12 USD en 1 día
(66 comentarios)
4.6

2 freelancers están ofertando un promedio de $11 por este trabajo

z123x

A proposal has not yet been provided

$10 USD en 3 días
(0 comentarios)
0.0