Question: C# CONSOLE APP: Create a console application that can help use calculate the result of an equation. Create the Equation class according to the UML
C# CONSOLE APP: Create a console application that can help use calculate the result of an equation. Create the Equation class according to the UML below. The app first asks the user to input the values for Left and Right. Once they have input the values, ask which calculation they wish to perform (add, subtract, multiply, or power). If they choose to apply a Power to either the Left or Right, call the appropriate method after asking them to which power they wish to raise the operand to (left to the power (L) or right to the power (R)). You can use Math.Pow() to calculate power. Calculate their results and build a string and add it to a List object. Once you have stored the results, ask the user if they wish to input another equation. If they say Yes or Y, repeat the process until they say No or N. Once they have finished inputting all of their equations, use a For Each loop to iterate through your List object and output all of the strings to the console.
Equation class
|
| Equation |
| + + | Left : double Right : double |
| + + + + + + + | Equation ( ) Equation ( left : double, right : double ) Add ( ) : double Subtract ( ) : double Multiply ( ) : double LeftToThePower ( power : int ) : double RightToThePower ( power : int ) : double |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
