SearchWiki:

CC Course 2005

PmWiki

Recent Changes Printable View Page History Edit Page

Team Members

  • Engl Bernhard; bernhardengl at gmx . net
  • Hemetsberger Matthias; kamenij at gmx . at
  • Buchgraber Philipp; unsu at gmx . at


Description:

Project Status:

  • Scanning is DONE
    • Scanner is able to scan itsself and all other classes of the project
  • Parsing is DONE
  • Type checking and error handling is DONE
  • Code generation for:
    • arithmetical expressions DONE
    • if/else DONE
    • while DONE
    • try/catch DONE
    • methodcalls (for methods declared within the same class)
    • Strings
    • arrays

  • VM finished

  • DEBUGGING: (code generation)
    • komplex if statements (ex. if(( i<j || j<k) && p!= 2) etc.)
    • methodcalls with Parameter(s)

  • MISSING:
  • objects, array of objects

  • code generation for:
    • calling mehtods with complex parameters
    • calling methods from other classes

Download:

Sample Program

  
public class Scanner {


// Globale Variablen
int [] l = new int [10];
int i = 1;
int j = 4;
int k = 3;


// variablen für if-else Anweisung
int ifWert1 = 10;
int ifWert2 = 23;

// char Varable deklarieren
char c = 'a';


public static void main()
{	
	// boolean Variable deklarieren
	boolean b = true;

// ***** array an einer bestimmten Stelle einen Wert zuweisen 
// ***** wert aus dem Array holen und in eine Variable Speichern 
	
	l[j] = j;
	k = l[j];
	System.out.println("wert des Arrays an der Stelle 'j': " + k);

	
// ***** Aufruf von verschiedenen Unterprogrammen zum Testen
// ***** der Funktionalität von if, else, while
	
	// test einer While-schleife
	whileTest();
	
	// Test von if, else if, else
	ifTest();

	
}

public void whileTest()
{
	System.out.println(" ");
	System.out.println("******* UP: WHILE *******" );
	while ( i < j)
	{
		System.out.println("While-Durchlauf: " + i );
 		i = i + 1;
	}
}

public void ifTest()
{	
	System.out.println(" ");
	System.out.println("******* UP: IF-ELSE *******" );
	if ( ifWert1 < ifWert2)
	{
		System.out.println("Parameter 1: " + ifWert1);
		System.out.println("Operator: < " );
		System.out.println("Parameter 2: " + ifWert2);
		System.out.println("-> IF ist richtig!" );
	}
	else
	{
		System.out.println("Parameter 1: " + ifWert1);
		System.out.println("Operator: < " );
		System.out.println("Parameter 2: " + ifWert2);
		System.out.println("-> IF ist FALSCH!");
	}

	if ( ifWert1 > ifWert2 )
	{
		System.out.println("Parameter 1: " + ifWert1);
		System.out.println("Operator: == " );
		System.out.println("Parameter 2: " + ifWert2);
		System.out.println("-> IF ist FALSCH!" );
	}
	else if ( ifWert1 < ifWert2 )
	{
		System.out.println("Parameter 1: " + ifWert1);
		System.out.println("Operator: != " );
		System.out.println("Parameter 2: " + ifWert2);
		System.out.println("-> ELSE IF ist richtig!" );
	}
	
	

}


}


 

CODE from the Program:

work so long.....

  • up to now approximately 6660
  • Manhours: >300
Edit Page - Page History - Printable View - Recent Changes - WikiHelp - SearchWiki
Page last modified on March 02, 2006, at 02:51 AM