Changed visibility of classes

This commit is contained in:
Ziver Koc 2015-03-24 20:30:15 +00:00
parent ff54e19845
commit d7b66238ed

View file

@ -138,15 +138,14 @@ public class MathParser {
e.printStackTrace(); e.printStackTrace();
} }
} }
}
abstract class Math{ static abstract class Math{
public abstract double exec(); public abstract double exec();
public abstract String toString(); public abstract String toString();
} }
class MathNode extends Math{ static class MathNode extends Math{
Math math; Math math;
public double exec() { public double exec() {
@ -158,7 +157,7 @@ class MathNode extends Math{
} }
} }
class MathNumber extends Math{ static class MathNumber extends Math{
double num; double num;
public double exec() { public double exec() {
@ -170,14 +169,14 @@ class MathNumber extends Math{
} }
} }
abstract class MathOperation extends Math{ static abstract class MathOperation extends Math{
Math math1; Math math1;
Math math2; Math math2;
public abstract double exec(); public abstract double exec();
} }
class MathAddition extends MathOperation{ static class MathAddition extends MathOperation{
public double exec() { public double exec() {
return math1.exec() + math2.exec(); return math1.exec() + math2.exec();
} }
@ -187,7 +186,7 @@ class MathAddition extends MathOperation{
} }
} }
class MathSubtraction extends MathOperation{ static class MathSubtraction extends MathOperation{
public double exec() { public double exec() {
return math1.exec() - math2.exec(); return math1.exec() - math2.exec();
} }
@ -197,7 +196,7 @@ class MathSubtraction extends MathOperation{
} }
} }
class MathMultiplication extends MathOperation{ static class MathMultiplication extends MathOperation{
public double exec() { public double exec() {
return math1.exec() * math2.exec(); return math1.exec() * math2.exec();
} }
@ -207,7 +206,7 @@ class MathMultiplication extends MathOperation{
} }
} }
class MathDivision extends MathOperation{ static class MathDivision extends MathOperation{
public double exec() { public double exec() {
return math1.exec() / math2.exec(); return math1.exec() / math2.exec();
} }
@ -217,7 +216,7 @@ class MathDivision extends MathOperation{
} }
} }
class MathModulus extends MathOperation{ static class MathModulus extends MathOperation{
public double exec() { public double exec() {
return math1.exec() % math2.exec(); return math1.exec() % math2.exec();
} }
@ -227,7 +226,7 @@ class MathModulus extends MathOperation{
} }
} }
class MathPow extends MathOperation{ static class MathPow extends MathOperation{
public double exec() { public double exec() {
double ret = 1; double ret = 1;
double tmp1 = math1.exec(); double tmp1 = math1.exec();
@ -243,7 +242,7 @@ class MathPow extends MathOperation{
} }
} }
class EmptyMath extends MathOperation{ static class EmptyMath extends MathOperation{
public double exec() { public double exec() {
return math1.exec(); return math1.exec();
} }
@ -252,3 +251,5 @@ class EmptyMath extends MathOperation{
return math1.toString(); return math1.toString();
} }
} }
}