在GNAT Programming Studio中,您如何运行该程序?我看到它编译成功,但我看不到我的程序开始运行的位置.我想测试一下.
说这个的python版本是什么..这是在java中
public static enum Operations {Add, Subtract, Multiply, Divide, None};
Run Code Online (Sandbox Code Playgroud)
我正在将整个程序转换为python,我只是无法弄清楚这一部分
我全班同学
import java.util.*;
public class Expression
{
public static enum Operations {Add, Subtract, Multiply, Divide, None};
int a;
int b;
Expression.Operations op;
public Expression()
{
a = 0;
b = 0;
op = Expression.Operations.None;
}
public Expression(int value1, int value2, Expression.Operations operation)
{
a = value1;
b = value2;
op = operation;
}
public boolean parseString(String expressionString, Map<Character, Integer> vars)
{
Scanner scanner = new Scanner(expressionString);
//Attempt to read …Run Code Online (Sandbox Code Playgroud)