Assume a machine that has a single register and six instructions.
LD - *A* which places the operand *A* into the register
ST - *A* which places the contents of the register into the variable *A*
AD - *A* which adds the contents of the variable *A* to the register
SB - *A* which subtracts the contents of the variable *A* from the register
ML - *A* which multiplies the contents of the register by the variable *A*
DV - *A* which divides the contents of the register by the variable *A*
Write a Java programme that accepts a postfix expression containing single-letter operands and the operators + , - , * , and / and which prints a sequence of instructions to evaluate the expression and leave the result in the register. Use variables of the form *TEMPn* as temporary variables.
For example, the postfix expression ABC*+ DE-/should yield the printout.
LD B
ML C
ST TEMP1
LD A
AD TEMP1
ST TEMP2
LD D
SB E
ST TEMP3
LD TEMP2
DV TEMP3
ST TEMP4
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Java SDK 2 and SDK 6