what the hell happend here
This commit is contained in:
		
							parent
							
								
									809786238b
								
							
						
					
					
						commit
						3e595922e6
					
				
					 25 changed files with 251 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								Code/Steiner/exam-15-01-2025/.vscode/settings.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Code/Steiner/exam-15-01-2025/.vscode/settings.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| { | ||||
|     "java.project.sourcePaths": ["src"], | ||||
|     "java.project.outputPath": "bin", | ||||
|     "java.project.referencedLibraries": [ | ||||
|         "lib/**/*.jar" | ||||
|     ] | ||||
| } | ||||
							
								
								
									
										18
									
								
								Code/Steiner/exam-15-01-2025/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Code/Steiner/exam-15-01-2025/README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| ## Getting Started | ||||
| 
 | ||||
| Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. | ||||
| 
 | ||||
| ## Folder Structure | ||||
| 
 | ||||
| The workspace contains two folders by default, where: | ||||
| 
 | ||||
| - `src`: the folder to maintain sources | ||||
| - `lib`: the folder to maintain dependencies | ||||
| 
 | ||||
| Meanwhile, the compiled output files will be generated in the `bin` folder by default. | ||||
| 
 | ||||
| > If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. | ||||
| 
 | ||||
| ## Dependency Management | ||||
| 
 | ||||
| The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/App.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/App.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/DoppelteBuchhaltung.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/DoppelteBuchhaltung.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/HabenKonto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/HabenKonto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/Konto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/Konto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/SollKonto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/SollKonto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/Transaktion.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/bin/Transaktion.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/App.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/App.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										29
									
								
								Code/Steiner/exam-15-01-2025/src/App.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								Code/Steiner/exam-15-01-2025/src/App.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| // Luca Burger | ||||
| public class App { | ||||
|     public static void main(String[] args) throws Exception { | ||||
|         DoppelteBuchhaltung buchhaltung = new DoppelteBuchhaltung(); | ||||
|         initBuchaltung(buchhaltung); | ||||
|         buchhaltung.alleKontenAnzeigen(); | ||||
| 
 | ||||
|         // Buchungen | ||||
|         buchhaltung.buchungDurchfuehren("1001", "2001", 5000, "Einzahlung in Kasse"); | ||||
|         buchhaltung.buchungDurchfuehren("1002", "2001", -3000, "Forderungen beglichen"); | ||||
|         buchhaltung.buchungDurchfuehren("1001", "2002", 4000, "Umsätze generieren"); | ||||
| 
 | ||||
|         // Kontenanzeigen | ||||
|         buchhaltung.bewegungenAufKontoAnzeigen("1001"); | ||||
|         buchhaltung.bewegungenAufKontoAnzeigen("1002"); | ||||
|         buchhaltung.bewegungenAufKontoAnzeigen("2001"); | ||||
|         buchhaltung.bewegungenAufKontoAnzeigen("2002"); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     private static void initBuchaltung(DoppelteBuchhaltung buchhaltung) { | ||||
|         buchhaltung.sollKontoErstellen("1001", "Kasse", 2.0); | ||||
|         buchhaltung.sollKontoErstellen("1002", "Forderungen", 0.0); | ||||
| 
 | ||||
|         buchhaltung.habenKontoErstellen("2001", "Verbindlichkeiten"); | ||||
|         buchhaltung.habenKontoErstellen("2002", "Umsatzerlöse"); | ||||
| 
 | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/DoppelteBuchhaltung.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/DoppelteBuchhaltung.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										70
									
								
								Code/Steiner/exam-15-01-2025/src/DoppelteBuchhaltung.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								Code/Steiner/exam-15-01-2025/src/DoppelteBuchhaltung.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,70 @@ | |||
| // Luca Burger | ||||
| 
 | ||||
| import java.util.ArrayList; | ||||
| import java.util.Scanner; | ||||
| 
 | ||||
| public class DoppelteBuchhaltung { | ||||
|     Scanner scan = new Scanner(System.in); | ||||
|     private ArrayList<Konto> konten = new ArrayList<Konto>(); | ||||
| 
 | ||||
|     public DoppelteBuchhaltung() { | ||||
|         // wow | ||||
|     } | ||||
| 
 | ||||
|     public void habenKontoErstellen(String kontonummer, String kontobezeichnung) { | ||||
|         HabenKonto konto = new HabenKonto(kontonummer, kontobezeichnung); | ||||
|         konten.add(konto); | ||||
|     } | ||||
| 
 | ||||
|     public void sollKontoErstellen(String kontonummer, String kontobezeichnung, double zinssatz) { | ||||
|         SollKonto konto = new SollKonto(kontonummer, kontobezeichnung, zinssatz); | ||||
|         konten.add(konto); | ||||
|     } | ||||
| 
 | ||||
|     public void buchungDurchfuehren(String kontonummerSoll, String kontonummerHaben, double betrag, | ||||
|             String beschreibung) { | ||||
|         Konto sollKonto = getKontoNachNummer(kontonummerSoll); | ||||
|         Konto habenKonto = getKontoNachNummer(kontonummerHaben); | ||||
|         try { | ||||
|             sollKonto.transaktionDurchfuehren(betrag, beschreibung); | ||||
|             habenKonto.transaktionDurchfuehren(betrag * -1, beschreibung); | ||||
|             sollKonto.buchen(betrag); | ||||
|             habenKonto.buchen(betrag * -1); | ||||
|         } catch (Exception e) { | ||||
|             System.out.println("error: " + e); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public void alleKontenAnzeigen() { | ||||
|         for (Konto konto : konten) { | ||||
|             String text; | ||||
|             if (konto instanceof SollKonto) { | ||||
|                 text = "Kontonummer: " + konto.getKontonummer() + ", Bezeichnung: " + konto.getKontobezeichnung() | ||||
|                         + ", Typ: Sollkonto, Saldo: " + konto.getSaldo(); | ||||
|             } else { | ||||
|                 text = "Kontonummer: " + konto.getKontonummer() + ", Bezeichnung: " + konto.getKontobezeichnung() | ||||
|                         + ", Typ: Habenkonto, Saldo: " + konto.getSaldo(); | ||||
|             } | ||||
|             System.out.println(text); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public void bewegungenAufKontoAnzeigen(String kontonummer) { | ||||
|         Konto konto = getKontoNachNummer(kontonummer); | ||||
|         ArrayList<Transaktion> transaktionen = konto.getTransaktionsverlauf(); | ||||
|         for (Transaktion transaktion : transaktionen) { | ||||
|             String text = "Kontonummer für Kontobewegung eingeben:\n" + konto.getKontonummer() | ||||
|                     + "\n Bewegungen auf Konto: " + konto.getKontobezeichnung() + "\n"; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private Konto getKontoNachNummer(String kontonummer) { | ||||
|         for (Konto konto : konten) { | ||||
|             if (kontonummer == konto.getKontonummer()) { | ||||
|                 return konto; | ||||
|             } | ||||
|         } | ||||
|         System.out.println("Konto nicht gefunden"); | ||||
|         return null; // error | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/HabenKonto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/HabenKonto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										12
									
								
								Code/Steiner/exam-15-01-2025/src/HabenKonto.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Code/Steiner/exam-15-01-2025/src/HabenKonto.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| // Luca Burger | ||||
| public class HabenKonto extends Konto { | ||||
| 
 | ||||
|     public HabenKonto(String kontonummer, String kontobezeichnung) { | ||||
|         super(kontonummer, kontobezeichnung); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void buchen(double betrag) { | ||||
|         this.saldo += betrag; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/Konto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/Konto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										39
									
								
								Code/Steiner/exam-15-01-2025/src/Konto.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								Code/Steiner/exam-15-01-2025/src/Konto.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| // Luca Burger | ||||
| 
 | ||||
| import java.util.ArrayList; | ||||
| import java.util.Date; | ||||
| 
 | ||||
| public abstract class Konto { | ||||
|     protected String kontonummer; | ||||
|     protected String kontobezeichnung; | ||||
|     protected double saldo; | ||||
|     private ArrayList<Transaktion> transaktionsverlauf = new ArrayList<Transaktion>(); | ||||
| 
 | ||||
|     public Konto(String kontonummer, String kontobezeichnung) { | ||||
|         this.kontonummer = kontonummer; | ||||
|         this.kontobezeichnung = kontobezeichnung; | ||||
|     } | ||||
| 
 | ||||
|     public String getKontonummer() { | ||||
|         return kontonummer; | ||||
|     } | ||||
| 
 | ||||
|     public String getKontobezeichnung() { | ||||
|         return kontobezeichnung; | ||||
|     } | ||||
| 
 | ||||
|     public double getSaldo() { | ||||
|         return saldo; | ||||
|     } | ||||
| 
 | ||||
|     public ArrayList<Transaktion> getTransaktionsverlauf() { | ||||
|         return transaktionsverlauf; | ||||
|     } | ||||
| 
 | ||||
|     public void transaktionDurchfuehren(double betrag, String beschreibung) { | ||||
|         Transaktion transaktion = new Transaktion(new Date(), beschreibung, betrag); | ||||
|         transaktionsverlauf.add(transaktion); | ||||
|     } | ||||
| 
 | ||||
|     protected abstract void buchen(double betrag); | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/SollKonto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/SollKonto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										14
									
								
								Code/Steiner/exam-15-01-2025/src/SollKonto.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Code/Steiner/exam-15-01-2025/src/SollKonto.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| // Luca Burger | ||||
| public class SollKonto extends Konto { | ||||
|     private double zinssatz; | ||||
| 
 | ||||
|     public SollKonto(String kontonummer, String kontobezeichnung, double zinssatz) { | ||||
|         super(kontonummer, kontobezeichnung); | ||||
|         this.zinssatz = zinssatz; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void buchen(double betrag) { | ||||
|         this.saldo += betrag; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/Transaktion.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/exam-15-01-2025/src/Transaktion.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										27
									
								
								Code/Steiner/exam-15-01-2025/src/Transaktion.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Code/Steiner/exam-15-01-2025/src/Transaktion.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| 
 | ||||
| // Luca Burger | ||||
| import java.util.Date; | ||||
| 
 | ||||
| public class Transaktion { | ||||
|     private Date datum; | ||||
|     private String beschreibung; | ||||
|     private double betrag; | ||||
| 
 | ||||
|     public Transaktion(Date datum, String beschreibung, double betrag) { | ||||
|         this.datum = datum; | ||||
|         this.beschreibung = beschreibung; | ||||
|         this.betrag = betrag; | ||||
|     } | ||||
| 
 | ||||
|     public Date getDatum() { | ||||
|         return datum; | ||||
|     } | ||||
| 
 | ||||
|     public String getBeschreibung() { | ||||
|         return beschreibung; | ||||
|     } | ||||
| 
 | ||||
|     public double getBetrag() { | ||||
|         return betrag; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										7
									
								
								Code/Steiner/packagesStuff/.vscode/settings.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Code/Steiner/packagesStuff/.vscode/settings.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| { | ||||
|     "java.project.sourcePaths": ["src"], | ||||
|     "java.project.outputPath": "bin", | ||||
|     "java.project.referencedLibraries": [ | ||||
|         "lib/**/*.jar" | ||||
|     ] | ||||
| } | ||||
							
								
								
									
										18
									
								
								Code/Steiner/packagesStuff/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Code/Steiner/packagesStuff/README.md
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| ## Getting Started | ||||
| 
 | ||||
| Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. | ||||
| 
 | ||||
| ## Folder Structure | ||||
| 
 | ||||
| The workspace contains two folders by default, where: | ||||
| 
 | ||||
| - `src`: the folder to maintain sources | ||||
| - `lib`: the folder to maintain dependencies | ||||
| 
 | ||||
| Meanwhile, the compiled output files will be generated in the `bin` folder by default. | ||||
| 
 | ||||
| > If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. | ||||
| 
 | ||||
| ## Dependency Management | ||||
| 
 | ||||
| The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/packagesStuff/bin/App.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/packagesStuff/bin/App.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										5
									
								
								Code/Steiner/packagesStuff/src/App.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								Code/Steiner/packagesStuff/src/App.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| public class App { | ||||
|     public static void main(String[] args) throws Exception { | ||||
|         System.out.println("Hello, World!"); | ||||
|     } | ||||
| } | ||||
|  | @ -0,0 +1,5 @@ | |||
| The Wheel of Time - A sprawling epic fantasy series by Robert Jordan. It follows the journey of Rand al'Thor as he struggles to control his newfound powers and faces the ultimate battle between light and shadow. | ||||
| Lord of the Rings - A high-fantasy epic by J.R.R. Tolkien. The story follows the journey of Frodo Baggins and his companions as they attempt to destroy the One Ring and defeat the Dark Lord Sauron. | ||||
| The First Law Trilogy - A grimdark fantasy series by Joe Abercrombie. It features morally complex characters, brutal realism, and intertwining stories of politics, war, and betrayal. | ||||
| The Kingkiller Chronicle - An epic fantasy series by Patrick Rothfuss. It recounts the life of Kvothe, a gifted musician and magician, as he seeks revenge and unravels mysteries in a richly imagined world. | ||||
| The Mistborn Series - A unique fantasy series by Brandon Sanderson. It combines a rich magic system based on metals with a story of rebellion, heroism, and unexpected twists. | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sage The DM
						Sage The DM