diff --git a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java index 9cba18a..97db000 100644 --- a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java +++ b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java @@ -11,30 +11,34 @@ import java.util.Scanner; public class Axel { public static void main(String[] args) throws FileNotFoundException { - Spreadsheet spr = new Spreadsheet(10,10); + Spreadsheet spr = new Spreadsheet(99,26); Scanner keyboard = new Scanner(System.in); spr.put("A3", "123"); spr.put("A2", "1"); - spr.put("B9", "=41+A2"); - spr.put("J5", "=7*6"); - spr.put("J6", "=3/2"); - + spr.put("A99", "=Summe(20:20)"); + spr.put("B99", "=SUMME(A2:A3)"); + spr.put("J6", "=36/2"); + spr.put("J7", "=a2+2"); + spr.put("J8", "=a2+J7*4"); + + + System.out.println(spr); while(true){ - System.out.println("Please enter the cell name (e.g. D8, G5): "); + System.out.print("Please enter the cell name (e.g. D8, G5): "); String cellName = keyboard.nextLine(); - System.out.println("Please enter your value or your formula: "); + System.out.print("Please enter your value or your formula (starting with '='): "); String cellValue = keyboard.nextLine(); spr.put(cellName, cellValue); System.out.println(spr); - System.out.println("Do you want to end the program? Y/N"); + System.out.print("Do you want to end the program? Y/N: "); if(keyboard.nextLine().equalsIgnoreCase("Y")){ break; }