forked from hummel/PR1-Spreadsheet
Angepasste UI
parent
b706e537c8
commit
d3326a5c3b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue