Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by Raffael ( 14 years ago )
/* Bsp21
 Majewski Raffael
1121099
 */
  
   public class Bsp21 {
   
      public static void main (String[] args) {
      
         AccountPlus myAccount = new AccountPlus();
         char choice;
         double howmuch;
      
         System.out.println("Kontobezeichnung eingeben:");
         myAccount.setName(SavitchIn.readLine());
      
         System.out.println("Kontobewegungen");
      
         do {
            System.out.println("g(utschreiben) - a(bbuchen) - k(ontostand) - e(nde) - b(ewegungen)");
            choice = SavitchIn.readLineNonwhiteChar();
         
            switch (choice) {
               case 'g':
                  System.out.println(" Wieviel gutschreiben?");
                  howmuch = SavitchIn.readLineDouble();
                  myAccount.deposit(howmuch);
                  break;
               case 'a':
                  System.out.println(" Wieviel abbuchen?");
                  howmuch = SavitchIn.readLineDouble();
                  myAccount.charge(howmuch);
                  break;
               case 'k':
                  System.out.println(" momentaner Kontostand: " + myAccount.getBalance());
                  break;
               case 'b':
                  myAccount.accountStatement();
                  break;
            }
         }
         while (choice != 'e');
      
         myAccount.getName();
      
         System.out.println("Kontobezeichnung: " + myAccount.getName());
         System.out.println("Kontostand aktuell: " + myAccount.getBalance());
      }
   }

 

Revise this Paste

Children: 43871 43873
Your Name: Code Language: