From c9206ed2da47ef221a05929f41bc63f0eef00ec7 Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Thu, 15 Dec 2022 19:37:48 +0100 Subject: [PATCH] ausgabe --- out/production/VPR_SCRIPT/Execute.class | Bin 2375 -> 1263 bytes src/Execute.java | 92 +++++++++++++----------- 2 files changed, 51 insertions(+), 41 deletions(-) diff --git a/out/production/VPR_SCRIPT/Execute.class b/out/production/VPR_SCRIPT/Execute.class index 9c1b1267e41b8344c0be074d8683418f53cb5b54..784d629a174ee0122e77c0741eca8a840b3e4a8c 100644 GIT binary patch literal 1263 zcmZuw*-{fh6g^EQbP@)_8Vo9mYY0nFa3hE!i=x9~VNoSMHDL+{v(;o`kx$_ZeDOse zpwKGIXTQU*@IgI26ND&9)!gpe=bn4->D%9bef|ny3NK@5LP)|e5k|8>`>uMYGI>?p z&a7!rR!2n+MoP1`+bydxBDqc2*E_6%um`I>kpv$Lh#0W$j z&vunpas?6%Jd1UIwgpM_Nt`!v0T%^2PiT%I0&+)HmhC+@%N{p$#3d7#F~C-fzPtOF z`;;;IKbme|2lTeV!*8ORSZT%j`dEq^9acOf#}|%~QFz zOR8M&ON-;W!5nRz(Z>dhu>*kM+9;}mFVTO4E)ZKQRo$Gu;Aj!ex=y1ShymQ;d(*!V zNQh>B?{Sx*6|~{>A;d>6nsA?AeGERE2mG1=0F%ga7vz4#~e z0FL68jyeQ11Pz1`X4rIzU*Wwrck;bwW-f`WWC$O%97`T!2y}F2G(;FeC%F_>1Uf^c zQWjp1oRc~<7|KWkL#!jUVkRv;%gGORW|T&wflX*43pURQhauY0c_DR#RyA$8y^~~Dl6Aq0gF52as$rXf?byN4;=`}iVbDryhfT0+ z9IVFaI~d0eii_9$6{hIWP~AD|*FyEmQXjw3wf|2_j9 z=wzs~6vj(O$DC4S#nA)~D4Mz$w$x}MKUb@CW+Lbz+9!BX444Y|H3NN$*N`88jsy-G zcpYyL{f?NEDa#QIn>#w!v##S14r@4KU;u+_S@qLGq*&#VVoA>X>79TjkJe%HWzNHeq*`K%aroh+AAmMqYyEV(1e znZp}Y<9enxATNS*3_U3~Z#m{gQLyu(oGsWqFPt7TBfN4YTM&+!wuC9lrtln5kv$Pi zF>E_wNh!=Brzq^4$kAbOOgd3whIVQ=Po$5`iEKqu)`G)sj=Dyb!wH{?vwX&;mFAS2 z<#vX9mYUZVgR)>zMA1}jKczHS-fj}L8Y zNK2lb9p@!KSPhm2I`w+mt$0~+%2K2lwYYnfzf{gATvwK*$4lcv7TjF9F^qW~*Kl3K zr>ZVKV@RxoW;s{fSZYNu(|OFg4LwEqFvkG}WyCx`2g3K!91kyH%R-1PKL3kmOV~+mv$=#< z1IHdAasEE`KEVEgpjz!-LN8f}2bVy5)yCv)goDYD5*{UCRieeUmy)i5NIbHfj0Tc= zOpitH;buG%)B6YNW1&09#_N}GOlc3_MxUCTRz_)(c1XlUkd@Yh$E}F zZd%!T2XW=hS<+j?W;M+C!{~xe5#HGG9m0$BeST2!8i3;U8|?8p)S;u1xNAoPx~V@% zvm^BI4xtIdXr{Zg6;o&qghVp(FC4W>; z*gqkQ92E=4BM8z96ZZGW(@0ZUM}hnT{l{p07Y<-GtOhe)+wo`ZL3F6c~gYGLl!MKLwas40Yj}dx| hF#RJ!h3wVg3a(NgA@n)=eU6(n(`obtar8Cf{{jZzKfM3| diff --git a/src/Execute.java b/src/Execute.java index 3b7a44d..83577d1 100644 --- a/src/Execute.java +++ b/src/Execute.java @@ -6,52 +6,62 @@ import java.util.Scanner; */ public class Execute { public static void main(String[] args) { - Data datei = new Data("users.txt"); - ArrayList user = datei.readUser(); - for (User user1 : user) { - System.out.println(user1); - } - System.out.println(); - System.out.println("\t\t\tANMELDUNG"); - int i = 0; - Scanner leser = new Scanner(System.in); + Data data = new Data("menue.txt"); - while (true) { + ArrayList menue = data.readMenue(); - - System.out.print("Name: "); - boolean error = false; - String name = leser.nextLine(); - error = isError(error, name); - System.out.print("Passwort: "); - String password = leser.nextLine(); - error = isError(error, password); - - - for (User user1 : user) { - if (!error) { - if (user1.getPassword().equals(password) && user1.getPhonenumber().equals(name)) { - System.out.println(); - System.out.println("Herzlich Willkommen " + user1.getNameParent1() + " und " + user1.getNameParent2() + ", Ihr Login war erfolgreich!"); - i++; - break; - - } else if (!(user1.getPassword().equals(password) && user1.getPhonenumber().equals(name))) { - System.out.println("Login fehlgeschlagen. Versuchen Sie es erneut."); - break; - } - - }else{ - System.out.println("Bitte Anmeldedaten angeben."); - break; - } - } - if (i > 0) { - break; - } + for (Menue m : menue) { + System.out.println(m); } } +// Data datei = new Data("users.txt"); +// ArrayList user = datei.readUser(); +// +// for (User user1 : user) { +// System.out.println(user1); +// } +// System.out.println(); +// System.out.println("\t\t\tANMELDUNG"); +// int i = 0; +// Scanner leser = new Scanner(System.in); +// +// while (true) { +// +// +// System.out.print("Name: "); +// boolean error = false; +// String name = leser.nextLine(); +// error = isError(error, name); +// System.out.print("Passwort: "); +// String password = leser.nextLine(); +// error = isError(error, password); +// +// +// for (User user1 : user) { +// if (!error) { +// if (user1.getPassword().equals(password) && user1.getPhonenumber().equals(name)) { +// System.out.println(); +// System.out.println("Herzlich Willkommen " + user1.getNameParent1() + " und " + user1.getNameParent2() + ", Ihr Login war erfolgreich!"); +// +// i++; +// break; +// +// } else if (!(user1.getPassword().equals(password) && user1.getPhonenumber().equals(name))) { +// System.out.println("Login fehlgeschlagen. Versuchen Sie es erneut."); +// break; +// } +// +// }else{ +// System.out.println("Bitte Anmeldedaten angeben."); +// break; +// } +// } +// if (i > 0) { +// break; +// } +// } +// } private static boolean isError(boolean error, String name) { if (name.isEmpty()) {