A “while language” is a very simple imperativeprogramming language with 5 statements
Assignconsists of a variable and an expressionWhileconsists ofan expression and a statementIfconsists of an expression and twostatementsCompoudconsists of a sequence of statementsOutputconsistsof a variable
You are required to code a class hierarchy in some OO languageof your choice that defines the abstract syntax of whileprograms.
For example, you will have:
abstract class Statement {
… some methods …
}
class Assign is_subclass_of Statement {
constructor Assign(Variable x, Expression y){
…
}
… some methods …
}
Expressions are very similar to those of a previous homework,but may contain variables and relational operators, e.g., < or>. Of course, there must be
PayPal Gateway not configured
PayPal Gateway not configured