#include<iostream>
using namespace std;

// Definieren Sie hier die Klasse binaerzahl

// Das Hauptprogramm bitte nicht aendern.

int main () {
   binaerzahl bzahl;

   cout << "\n1. Test - Initialisierung" << endl;
   cout << "=========================" << endl;
   cout << "Binaerzahl: " ;
   bzahl.output(); 
   cout << endl << endl;

   cout << "2. Test - Methode set_bit" << endl;
   cout << "=========================" << endl;
   cout << "Bereichsüberschreitung bei Index -2 : ";
   if (bzahl.set_bit(-2)) 
      cout << "wurde nicht erkannt" << endl;
   else
      cout << "wurde erkannt" << endl;

   cout << "Bereichsüberschreitung bei Index 100 : ";
   if (bzahl.set_bit(-100)) 
      cout << "wurde nicht erkannt" << endl;
   else
      cout << "wurde erkannt" << endl;

   cout << "Binaerzahl nach dem Test: " ;
   bzahl.output(); 
   cout << endl << endl;
   
   cout << "Setzen der Bits 2 bis 20 und 61 und 62" << endl;
   for (int i=2; i <= 20; i++)
      if (!bzahl.set_bit(i))
         cout << "set_bit liefert false für index " << i << endl;

   bzahl.set_bit(61);
   bzahl.set_bit(62);
   
   cout << "Binaerzahl nach dem Test: " ;
   bzahl.output(); 
   cout << endl << endl;

   cout << "3. Test - Methode increment" << endl;
   cout << "===========================" << endl;
   cout << "       1. Aufruf : ";
   bzahl.increment();
   bzahl.output(); 
   cout << endl << endl;

   cout << "       2. Aufruf : ";
   bzahl.increment();
   bzahl.output(); 
   cout << endl << endl;

   cout << "       3. Aufruf : ";
   bzahl.increment();
   bzahl.output(); 
   cout << endl << endl;

   cout << "      50. Aufruf : ";
   for (int i=4; i <= 50; i++)
       bzahl.increment();

   bzahl.output(); 
   cout << endl << endl;

    cout << "11050000. Aufruf : ";
   for (int i=51; i <= 11050000; i++)
       bzahl.increment();

   bzahl.output(); 
   cout << endl << endl;
}

