help me lord
This commit is contained in:
		
							parent
							
								
									fb196693e4
								
							
						
					
					
						commit
						db6b2a2a6e
					
				
					 42 changed files with 342 additions and 0 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/giroKonto/src/App.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/giroKonto/src/App.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										16
									
								
								Code/Steiner/giroKonto/src/App.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Code/Steiner/giroKonto/src/App.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| public class App { | ||||
|     public static void main(String[] args) throws Exception { | ||||
|         // Aufgabe 1 | ||||
|         System.out.println("Aufgabe 1: \n"); | ||||
| 
 | ||||
|         Konto konto1 = new Konto("0000000001", 1000); | ||||
|         System.out.println(konto1.toString()); | ||||
|         konto1.einzahlen(500); | ||||
|         konto1.abheben(750); | ||||
|         System.out.println("\nDaten nach transaktionen: "); | ||||
|         System.out.println(konto1.toString()); | ||||
| 
 | ||||
|         // Aufgabe 2 | ||||
|         System.out.println("Aufgabe 2"); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/giroKonto/src/Konto.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/giroKonto/src/Konto.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										40
									
								
								Code/Steiner/giroKonto/src/Konto.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								Code/Steiner/giroKonto/src/Konto.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,40 @@ | |||
| public class Konto { | ||||
|     private String kontonummer; | ||||
|     private double kontostand; | ||||
| 
 | ||||
|     public Konto(String kontonummer, int kontostand) { | ||||
|         if (kontonummer.length() == 10) { | ||||
|             this.kontonummer = kontonummer; | ||||
|             this.kontostand = kontostand; | ||||
|         } else | ||||
|             System.out.println("Es ist fehler beim erstellen des Konto aufgetreten"); | ||||
|     } | ||||
| 
 | ||||
|     public String getKontonummer() { | ||||
|         return kontonummer; | ||||
|     } | ||||
| 
 | ||||
|     public double getKontostand() { | ||||
|         return kontostand; | ||||
|     } | ||||
| 
 | ||||
|     public void abheben(double betrag) { | ||||
|         if (kontostand >= 0) { | ||||
|             this.kontostand -= betrag; | ||||
|         } else | ||||
|             System.out.println("Fehlermeldung #1225"); | ||||
|     } | ||||
| 
 | ||||
|     public void einzahlen(double betrag) { | ||||
|         if (kontostand >= 0) { | ||||
|             this.kontostand += betrag; | ||||
|         } else | ||||
|             System.out.println("Fehlermeldung #5221"); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return "Konto [Kontonummer=" + kontonummer + ", Kontostand=" + kontostand + "CHF]"; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sage The DM
						Sage The DM