实验截图 实验代码 import java.util.StringTokenizer; import java.util.Stack; public class MyDC { /** * constant for addition symbol */ private final char ADD = '+'; /** * constant for subtraction symbol */ private final char SUBTRACT = '-'; /** * constant for…
20155310 2016-2017-2<Java程序设计>课堂实践补交 第九周 程序设计中临时变量的使用 public class linshibianliang { public static int[] insert(int a[], int index, int value) { int b[] = new int[a.length + 1]; for (int i = 0; i < b.length; i++) { if (i < index - 1) { b[i] =…
测试代码: 码云链接 import java.util.Scanner; public class MyDCTester { public static void main(String[] args) { String expression, again; int result; try { Scanner in = new Scanner(System.in); do { MyDC evaluator = new MyDC(); System.out.println("Enter a val…
一.任务详情 提交测试截图和码云练习项目链接,实现Linux下dc的功能,计算后缀表达式的值 二.源代码 1.MyDC类 import java.util.StringTokenizer; import java.util.Stack; public class MyDC { /** constant for addition symbol */ private final char ADD = '+'; /** constant for subtraction symbol */ privat…