VL 2 1 done
This commit is contained in:
parent
7705945e9e
commit
045ebe5e33
@ -8,13 +8,14 @@
|
||||
|
||||
- Abgabe der Ergebnisse des Selbststudiums am 26.04.2024
|
||||
<br>Sowohl SourceCode, PDF als auch Word Datei
|
||||
- VL 2 Aufgabe 1 (Erstellen von Testdaten)
|
||||
|
||||
|
||||
- keine
|
||||
|
||||
## Angefangene unfertige Lösungen:
|
||||
|
||||
- VL 2 aufg 1 & 2
|
||||
- VL 2 aufg 2
|
||||
|
||||
|
||||
- keine
|
@ -1,17 +1,41 @@
|
||||
package part2.aufg1;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
|
||||
public class Anwendung {
|
||||
public static void main(String[] args){
|
||||
public static void main(String[] args) {
|
||||
int startingNR = 420000;
|
||||
int amountOfSets = 15;
|
||||
|
||||
for (int i=0; i<amountOfSets; i++){
|
||||
CustomerData data = new CustomerData(startingNR++);
|
||||
System.out.println(data.getSpacedValues());
|
||||
try {
|
||||
FileWriter out1 = new FileWriter("C:\\Users\\dh10mbo\\OneDrive - Durr Group\\Documents\\Uni\\S2\\Repos\\S2_Aufgaben\\src\\part2\\aufg1\\output_files\\spacedOut.txt");
|
||||
FileWriter out2 = new FileWriter("C:\\Users\\dh10mbo\\OneDrive - Durr Group\\Documents\\Uni\\S2\\Repos\\S2_Aufgaben\\src\\part2\\aufg1\\output_files\\CSVOut.txt");
|
||||
|
||||
BufferedWriter writer1 = new BufferedWriter(out1);
|
||||
BufferedWriter writer2 = new BufferedWriter(out2);
|
||||
|
||||
for (int i = 0; i < amountOfSets; i++) {
|
||||
CustomerData data = new CustomerData(startingNR++);
|
||||
String spacedData = data.getSpacedValues();
|
||||
System.out.println(spacedData);
|
||||
writer1.write(spacedData);
|
||||
writer1.newLine();
|
||||
|
||||
}
|
||||
for (int i = 0; i < amountOfSets; i++) {
|
||||
CustomerData data = new CustomerData(startingNR++);
|
||||
String csvData = data.getCSV();
|
||||
System.out.println(csvData);
|
||||
writer2.write(csvData);
|
||||
writer2.newLine();
|
||||
}
|
||||
|
||||
writer1.close();
|
||||
writer2.close();
|
||||
}
|
||||
for (int i=0; i<amountOfSets; i++){
|
||||
CustomerData data = new CustomerData(startingNR++);
|
||||
System.out.println(data.getCSV());
|
||||
catch (Exception e){
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
}
|
15
src/part2/aufg1/output_files/CSVOut.txt
Normal file
15
src/part2/aufg1/output_files/CSVOut.txt
Normal file
@ -0,0 +1,15 @@
|
||||
420015#Susanne#Novincack#Ulmer Str.#73#70192 Stuttgart#1771.0
|
||||
420016#Ingo#Ullmann#Dorfstr.#27#70197 Stuttgart#875.0
|
||||
420017#Marion#Kaiser#Ulmer Str.#3#72074 T<>bingen#976.0
|
||||
420018#Jochen#Zerlett#Rosenweg#19#70191 Stuttgart#1591.0
|
||||
420019#Marion#Zerlett#Nelkenweg#63#70199 Stuttgart#1429.0
|
||||
420020#Holger#Fuchs#Hauptstr.#71#72182 Eutingen#1239.0
|
||||
420021#Uschi#Fuchs#Rosenweg#131#70195 Stuttgart#1299.0
|
||||
420022#Steffi#Andrack#Freiburger Str.#76#72182 Eutingen#1937.0
|
||||
420023#Steffi#Kaiser#Hauptstr.#103#70193 Stuttgart#669.0
|
||||
420024#Steffi#Andrack#Beethovenallee#117#72213 Altensteig#1684.0
|
||||
420025#Jochen#Hellmann#Stuttgarter Str.#125#72181 Starzach#1747.0
|
||||
420026#Jochen#Schmidt#Beethovenallee#5#72210 Altensteig#796.0
|
||||
420027#Steffi#Kaiser#Mönchner Str.#35#72070 T<>bingen#1052.0
|
||||
420028#Uschi#Hinz#Beethovenallee#145#72189 V<>hringen#964.0
|
||||
420029#Susanne#Hellmann#Mönchner Str.#64#72186 Weiherhof#1128.0
|
15
src/part2/aufg1/output_files/spacedOut.txt
Normal file
15
src/part2/aufg1/output_files/spacedOut.txt
Normal file
@ -0,0 +1,15 @@
|
||||
420000 Jochen Kaiser Rosenweg 134 72184 Eutingen 1809.0
|
||||
420001 Jochen Kaiser Freiburger Str. 118 70199 Stuttgart 1321.0
|
||||
420002 Carola Hampel Freiburger Str. 18 72184 Eutingen 1434.0
|
||||
420003 Carola Ullmann Goetheweg 52 72187 V<>hringen 1212.0
|
||||
420004 Uschi Meier Schillerstr. 128 70195 Stuttgart 1902.0
|
||||
420005 Frank Zerlett Beethovenallee 126 72184 Eutingen 1011.0
|
||||
420006 Jochen Hampel Dorfstr. 12 72189 V<>hringen 572.0
|
||||
420007 Stefan Ullmann Mönchner Str. 3 72218 Wildberg 1346.0
|
||||
420008 Jochen Hellmann Schillerstr. 123 70193 Stuttgart 1497.0
|
||||
420009 Uschi Hellmann Freiburger Str. 43 72070 T<>bingen 1500.0
|
||||
420010 Uschi Hampel Hauptstr. 117 70195 Stuttgart 781.0
|
||||
420011 Susanne Kaiser Ulmer Str. 3 70195 Stuttgart 1448.0
|
||||
420012 Jochen Kaiser Dorfstr. 95 70192 Stuttgart 1876.0
|
||||
420013 Ingo Zerlett Rosenweg 96 70197 Stuttgart 636.0
|
||||
420014 Frank Hellmann Dorfstr. 127 70195 Stuttgart 1800.0
|
Loading…
Reference in New Issue
Block a user