Order Klasse angepasst, sowie readOrder angepasst

This commit is contained in:
Sabine Gubitz 2023-01-10 16:23:10 +01:00
parent 19d36d3464
commit 644df46a7a
2 changed files with 11 additions and 34 deletions

View File

@ -184,18 +184,10 @@ public class Data {
String[] parts = row.split(";");
String date = parts[0];
String meat = parts[1];
int meatCount = Integer.parseInt(parts[2]);
String vegi = parts[3];
int vegiCount = Integer.parseInt(parts[4]);
String vegan = parts[5];
int veganCount = Integer.parseInt(parts[6]);
String desertV = parts[7];
int desertVCount = Integer.parseInt(parts[8]);
String desert = parts[9];
int desertCount = Integer.parseInt(parts[10]);
orderList.add(new Order(date, meat, meatCount,vegi, vegiCount, vegan, veganCount, desertV,
desertVCount, desert, desertCount));
String user = parts[1];
String mealtyp = parts[3];
String deserttyp = parts[5];
orderList.add(new Order(date, user, mealtyp, deserttyp));
}
return null;//orderList

View File

@ -1,29 +1,14 @@
public class Order {
String date;
String meat;
int meatCount;
String vegi;
int vegiCount;
String vegan;
int veganCount;
String desertV;
int desertVCount;
String desert;
int desertCount;
String user;
String mealtyp;
String deserttyp;
Order (String date, String meat, int meatCount, String vegi, int vegiCount, String vegan, int veganCount,
String desertV, int desertVCount, String desert, int desertCount)
Order (String date, String user, String mealtyp, String deserttyp)
{
this.date = date;
this.meat = meat;
this.meatCount = meatCount;
this.vegi = vegi;
this.vegiCount = vegiCount;
this.vegan = vegan;
this.veganCount = veganCount;
this.desertV = desertV;
this.desertVCount = desertVCount;
this.desert = desert;
this.desertCount = desertCount;
this.user = user;
this.mealtyp = mealtyp;
this.deserttyp = deserttyp;
}
}