Commit 8dd9be80 authored by updjx's avatar updjx

3 simple testcases

parent ad265467
class semanticAlgorithm {
public int varInt;
public void algorithm() {
varInt = 1 + 2;
int localVar = varInt;
localVar = varInt + 4;
int counter = 0;
while (localVar != 0) {
counter++;
localVar--;
}
System.out.prntln(counter);
}
}
\ No newline at end of file
class semanticAlgorithm {
public int algorithm() {
int localVar = varInt;
int counter = 0;
while (localVar != 0) {
counter++;
localVar--;
}
return counter;
}
}
\ No newline at end of file
/**
* TODO 2 testcases?
*/
class semanticClass {
public A objectA;
public B object B;
publis static void main(String Args[]) {
objectA.init();
objectB.init();
int result;
boolean bigger;
bigger = objectA.atr > objectB.atr;
result = objectA.atr + objectB.atr;
}
}
class A {
int atr;
public void init () {
atr = 2;
}
}
class B {
int atr;
public void init () {
atr = 3;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment