From 701302e3cdbb1e448c5b69ecace81d99a1b15f87 Mon Sep 17 00:00:00 2001 From: <3010678@stud.hs-mannheim.de> Date: Sun, 7 Jan 2024 15:30:00 +0100 Subject: [PATCH] //some UI loop changes --- .../hs_mannheim/informatik/spreadsheet/Axel.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java index 3bf30a0..2f2cf2c 100644 --- a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java +++ b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java @@ -46,12 +46,13 @@ public class Axel { //set values in cells - System.out.println("cell:"); + System.out.println(); + System.out.println("cell name:"); readInput= sc.nextLine(); currentCell=readInput; - System.out.println("Set:"); + System.out.println("Set formula or value:"); readInput= sc.nextLine(); @@ -62,11 +63,18 @@ public class Axel { System.out.println(spr); System.out.println(); + + System.out.println("Do you want to save the sheet?(y/n)"); + readInput=sc.nextLine(); + if(readInput.equals("y")||readInput.equals("Y")) { + spr.saveCsv("test"); + } + + System.out.println("Exit? y/n"); readInput= sc.nextLine(); - - if(readInput.equals("y")||readInput.equals("Y")) + if(readInput.equals("y")||readInput.equals("Y")) exit=true; }