In this recitation assignment, you are given the definition of a Class, called Value , which represents values of different PLSL language types of operands, as (INTEGER, REAL, STRING) and Boolean,...

1 answer below »

In this recitation assignment, you are given the definition of a Class, calledValue, which represents values of different PLSL language types of operands, as (INTEGER, REAL, STRING) and Boolean, through using C++ types as (int, float, string, and bool) for four data members. The objective of defining theValueclass is to facilitate constructing an interpreter for the PLSL language which evaluates expressions and executes PLSL statements.


In this assignment, you are required to implement some of the overloaded operators of theValueclass in order to enable testing this class separately as a unit before using it in the construction of the PLSL interpreter in PA3. You are required to implement the overloaded operators for Addition, Multiplication and Equality. The semantic rules governing the evaluation of expressions in the PLSL language are summarized below:



  • The binary arithmetic operations for addition (PLUS), subtraction (MINUS), multiplication (MULT), and division (DIV) are performed upon two numeric operands (i.e., INTEGER, REAL) of the same or different types. If the operands are of the same type, the type of the result is the same type as the operator’s operands. Otherwise, the type of the result is REAL.

  • When the PLUS operator is applied on STRING operands, the operator performs string concatenation.

  • The EQUAL LTHAN and GTHAN relational operators operate upon two compatible operands. The evaluation of a logical expression, based on EQUAL, LTHAN or GTHAN operation, produces either a true or false value that controls the execution of the IfStmt Then-part or Else-part statement.

You need to run code in to provided tool its shown in video. go to my canvas then go to module then go to RA 8 section all details provided there. for log in UCID-pp222 AND PASSWORD- Princep411$. this is website for log inhttps://canvas.njit.edu/mostly like to have expert is Pawan or someone like him best one.

Answered 1 days AfterApr 05, 2022

Answer To: In this recitation assignment, you are given the definition of a Class, called Value , which...

Nimesh answered on Apr 07 2022
117 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here