0

Calculator Command bug.

So I have been tasked to create a custom notepad program, I decided to add a few features including a calculator. In order to access these feature my user would input a command to access them. The way the program would work is first, It welcomes the user to the program, then it tells them to enter their first and last name. It will then teach them the commands, where if they input nameinfo, the program returns their name. The commands are all based in separate classes which use polymorphism to extend them to each other and extend to the main Notepad class. The calculator command is extended to the NameRecallCMD class (The nameinfo command). The way the calculator command works is: A user inputs calculator to acces it. Then they type in 2 numbers, after that they input an operation they want for the result. So if they want to do addition on the numbers they input: calculator 1 2 sum // this is to perform an addition operation. Output: 3 The problem is after they input sum. The program starts throwing errors. https://code.sololearn.com/comYWVwhLKGV

6th Aug 2018, 5:18 PM
C0D3X
C0D3X - avatar
1 Respuesta