Ledger Nano X - The secure hardware wallet
SHARE
TWEET

derp2

a guest Mar 31st, 2020 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void initializeDatabase(String fileName){
  2.         try{
  3.             BufferedReader buff = new BufferedReader(new FileReader(fileName));
  4.             currentTravelerIndex = 0;
  5.             numTravelers = 0;
  6.             String line;
  7.             while((line = buff.readLine()).equals("~")){
  8.                 String travAgentID, FirstName, LastName, Address, Phone, TravelType, PaymentType, TripCost,
  9.                         AlgType, IllType, MdContact, MdPhone;
  10.  
  11.                 travAgentID = line;
  12.  
  13.                 line = buff.readLine();
  14.                 FirstName = line;
  15.  
  16.                 line = buff.readLine();
  17.                 LastName = line;
  18.  
  19.                 line = buff.readLine();
  20.                 Address = line;
  21.  
  22.                 line = buff.readLine();
  23.                 Phone = line;
  24.  
  25.                 line = buff.readLine();
  26.                 TravelType = line;
  27.  
  28.                 line = buff.readLine();
  29.                 PaymentType = line;
  30.  
  31.                 line = buff.readLine();
  32.                 TripCost = line;
  33.  
  34.                 line = buff.readLine();
  35.                 AlgType = line;
  36.  
  37.                 line = buff.readLine();
  38.                 IllType = line;
  39.  
  40.                 line = buff.readLine();
  41.                 MdContact = line;
  42.  
  43.                 line = buff.readLine();
  44.                 MdPhone = line;
  45.  
  46.                 line = buff.readLine();
  47.  
  48.                 MedCond medprofile = new MedCond(AlgType, IllType, MdContact, MdPhone);
  49.                 TravProf profile = new TravProf(travAgentID, FirstName, LastName, Address, Phone, TravelType,
  50.                                                 PaymentType, Float.parseFloat(TripCost), medprofile);
  51.  
  52.                 travelerList[currentTravelerIndex] = profile;
  53.                 currentTravelerIndex++;
  54.                 numTravelers++;
  55.             }
  56.             buff.close();
  57.         }catch(IOException e) {
  58.             e.printStackTrace();
  59.         }
  60.         currentTravelerIndex = 0;
  61.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top