SlideShare ist ein Scribd-Unternehmen logo
1 von 6
import   javax.microedition.midlet.*;
import   javax.microedition.lcdui.*;
import   javax.microedition.io.*;
import   java.io.*;

public class MoneyTransfer extends MIDlet implements CommandListener{
    Display D;
///Registration
   Form F=new Form("Registration");
   TextField t1=new TextField("Account No:","",20,TextField.ANY);
   TextField t2=new TextField("Date of Birth:","",20,TextField.ANY);
   TextField t3=new TextField("Password:","",20,TextField.PASSWORD);
   TextField t4=new TextField("Confirm Password:","",20,TextField.PASSWORD);
  TextField t5=new TextField("Your Security Code:","",20,TextField.PASSWORD);
  StringItem si=new StringItem("Message:","");
   Command submit=new Command("Submit",Command.SCREEN,1);
   Command reset=new Command("Reset",Command.SCREEN,2);
////////


////Login
Form F1=new Form("Sign In");
TextField t6=new TextField("Account No:","",20,TextField.ANY);
TextField t7=new TextField("Password:","",20,TextField.PASSWORD);
Command signin=new Command("Sign In",Command.SCREEN,1);
StringItem msg=new StringItem("Message:","");
 //////
    List menu=new List("Menu",List.IMPLICIT);
 List usermenu=new List("Your Options",List.IMPLICIT);
//account details
Form AD=new Form("Your Accounts Details");
StringItem s1=new StringItem("Account No:","");
StringItem s2=new StringItem("Name:","");
StringItem s3=new StringItem("Birth Date:","");
StringItem s4=new StringItem("Address:","");
StringItem s5=new StringItem("Gender:","");
StringItem s6=new StringItem("Email Id:","");
StringItem s7=new StringItem("Date Ac:","");
StringItem s8=new StringItem("Type:","");
StringItem s9=new StringItem("Balance:","");
StringItem s10=new StringItem("Picture:","");
Image im=null;
ImageItem mi=null;
////Money Transfer
Form MT=new Form("Money Transfer");
StringItem from=new StringItem("Your Account No:","");
TextField to=new TextField("Account To:","",20,TextField.ANY);
Command mtok=new Command("Ok",Command.SCREEN,1);
Form MTT=new Form("Money Transfer Transaction");
StringItem t_from=new StringItem("Account No From:","");
StringItem t_from_name=new StringItem("Name:","");
StringItem t_to=new StringItem("Account No To:","");
StringItem t_to_name=new StringItem("Name:","");
Image im_to=null;
ImageItem mi_to=null;
StringItem cd=new StringItem("Date:","");

TextField amt=new TextField("Amount:","",20,TextField.NUMERIC);

//////
  public void startApp() {
   D=Display.getDisplay(this);
  ///registration
F.append(t1);
  F.append(t2);
  F.append(t3);
  F.append(t4);
  F.append(t5);
  F.append(si);
  F.addCommand(submit);
  F.addCommand(reset);
  F.setCommandListener(this);
  /////

   ///Login
   F1.append(t6);
   F1.append(t7);
   F1.append(msg);
   F1.addCommand(signin);
   F1.setCommandListener(this);
   /////
   ///account detail///
   AD.append(s1);
   AD.append(s2);
   AD.append(s3);
   AD.append(s4);
   AD.append(s5);
   AD.append(s6);
   AD.append(s7);
   AD.append(s8);
   AD.append(s9);
   AD.append(s10);
///money transfer
MT.append(from);
MT.append(to);
MT.addCommand(mtok);
MT.setCommandListener(this);


///
////User Menu///
usermenu.append("Account Details",null);
usermenu.append("Transaction",null);
usermenu.append("Money Transfer",null);
usermenu.append("Main Menu",null);
usermenu.append("Exit",null);
usermenu.setCommandListener(this);
///

  //main menu
  menu.append("Registration",null);
  menu.append("Sign In", null);
  menu.setCommandListener(this);
  ////

  D.setCurrent(menu);
  }

   public void pauseApp() {
   }

   public void destroyApp(boolean unconditional) {
   }

   public void commandAction(Command c,Displayable d)
   {if(c==List.SELECT_COMMAND && d==menu)
    {
switch(menu.getSelectedIndex())
       {
           case 0:
               D.setCurrent(F);
               break;
           case 1:

               D.setCurrent(F1);
                  break;
            default:
                break;

       }

     }
     else if(c==List.SELECT_COMMAND && d==usermenu)
     {switch(usermenu.getSelectedIndex())
       {case 0:
        con_acc ac=new con_acc();
        ac.start();

           break;
           case 1:
           break;
           case 2:
                  from.setText(t6.getString());
           D.setCurrent(MT);
           break;
                }

             }

       else if(c==submit)
       {
     connect cc=new connect();
     cc.start();
       }
    else if(c==reset)
    {t1.setString("");
    t2.setString("");
    t3.setString("");
    t4.setString("");
    t5.setString("");
    si.setText("");
         }
         else if(c==signin)
         {con_signin cs=new con_signin();
             cs.start();
                 }
     }

///////////registration/////
 class connect extends Thread
   {public void run(){
      try{
    HttpConnection
cn=(HttpConnection)Connector.open("http://localhost:8080/servlet/registration?
acn="+t1.getString()+"&db="+t2.getString()+"&pwd="+t3.getString()
+"&cpwd="+t4.getString()+"&sc="+t5.getString());
    cn.setRequestMethod(HttpConnection.GET);
    if(cn.getResponseCode()==HttpConnection.HTTP_OK)
    {
      InputStream in=cn.openInputStream();
      ByteArrayOutputStream b=new ByteArrayOutputStream();
int i;
       while((i=in.read())!=-1)
       {
       b.write(i);
          }
         byte by[]=b.toByteArray();
         String s=new String(by);
         si.setText(s);
         cn.close();

   }
    else
    {
    si.setText("Connection Fail");
    }



    }
    catch(Exception e)
    {si.setText(e+"");}
    }
   }

//////////

///////////signin/////
 class con_signin extends Thread
   {public void run(){
     try{
    HttpConnection
cn=(HttpConnection)Connector.open("http://localhost:8080/servlet/signin?
acn="+t6.getString()+"&pwd="+t7.getString());

    cn.setRequestMethod(HttpConnection.GET);
    if(cn.getResponseCode()==HttpConnection.HTTP_OK)
    {
      InputStream in=cn.openInputStream();
      ByteArrayOutputStream b=new ByteArrayOutputStream();
      int i;
      while((i=in.read())!=-1)
      {
      b.write(i);
          }
        byte by[]=b.toByteArray();
        String s=new String(by);
        if(s.equals("true"))
        {
        D.setCurrent(usermenu);
        }else{
        msg.setText(s);}
        cn.close();
   }
    else
    {
    si.setText("Connection Fail");
    }
    }
    catch(Exception e)
    {si.setText(e+"");}
    }
   }

//////////
///////////accounts detail/////
 class con_acc extends Thread
   {public void run(){
     try{
    HttpConnection
cn=(HttpConnection)Connector.open("http://localhost:8080/servlet/account_details
?acn="+t6.getString());

    cn.setRequestMethod(HttpConnection.GET);
    if(cn.getResponseCode()==HttpConnection.HTTP_OK)
    {
      InputStream in=cn.openInputStream();
      ByteArrayOutputStream b=new ByteArrayOutputStream();
      int i;
      while((i=in.read())!=-1)
      {
      b.write(i);
         }
        byte by[]=b.toByteArray();
        String s=new String(by);
        String Fi[]=split(s);
        s1.setText(Fi[0]);
        s2.setText(Fi[1]);
        s3.setText(Fi[2]);
        s4.setText(Fi[3]);
        s5.setText(Fi[4]);
        s6.setText(Fi[5]);
        s7.setText(Fi[6]);
        s8.setText(Fi[7]);
        s9.setText(Fi[8]);
        s10.setText(Fi[9]);
        con_pic cp=new con_pic();
        cp.start();
  D.setCurrent(AD);

       cn.close();
   }
    else
    {
    si.setText("Connection Fail");
    }
    }
    catch(Exception e)
    {si.setText(e+"");}
    }
   }

//////////


///////////fetch picture/////
 class con_pic extends Thread
   {public void run(){
     try{
    HttpConnection
cn=(HttpConnection)Connector.open("http://localhost:8080/mt/"+s10.getText());

    cn.setRequestMethod(HttpConnection.GET);
    if(cn.getResponseCode()==HttpConnection.HTTP_OK)
    {
      InputStream in=cn.openInputStream();
      ByteArrayOutputStream b=new ByteArrayOutputStream();
      int i;
while((i=in.read())!=-1)
     {
     b.write(i);
        }
       byte by[]=b.toByteArray();
     try{
     im=Image.createImage(by, 0, by.length);
     mi=new ImageItem("",im,ImageItem.LAYOUT_DEFAULT,"");
     AD.append(mi);
 }catch(Exception e){}

       cn.close();
   }
    else
    {
    si.setText("Connection Fail");
    }
    }
    catch(Exception e)
    {si.setText(e+"");}
    }
   }

//////////




///Split String
String [] split(String s)
{int i,count=0;
   for(i=0;i<s.length();i++)
   { char ch=s.charAt(i);
        if(ch==',')
        {count++;}
        }


String Fi[]=new String[count+1];
Fi[0]=new String();
int j=0;

for(i=0;i<s.length();i++)
{ char ch=s.charAt(i);

    if(ch!=',')
    {Fi[j]=Fi[j]+ch;
        }
        else
        {j++;
        Fi[j]=new String();
        }
      }


return(Fi);}
////
}

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
C++ TUTORIAL 1
C++ TUTORIAL 1C++ TUTORIAL 1
C++ TUTORIAL 1
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
C++ TUTORIAL 9
C++ TUTORIAL 9C++ TUTORIAL 9
C++ TUTORIAL 9
 
Implementing string
Implementing stringImplementing string
Implementing string
 
C++ TUTORIAL 3
C++ TUTORIAL 3C++ TUTORIAL 3
C++ TUTORIAL 3
 
Railwaynew
RailwaynewRailwaynew
Railwaynew
 
Cquestions
Cquestions Cquestions
Cquestions
 
Static and const members
Static and const membersStatic and const members
Static and const members
 
C++ TUTORIAL 8
C++ TUTORIAL 8C++ TUTORIAL 8
C++ TUTORIAL 8
 
C++ TUTORIAL 4
C++ TUTORIAL 4C++ TUTORIAL 4
C++ TUTORIAL 4
 
C++ file
C++ fileC++ file
C++ file
 
Go a crash course
Go   a crash courseGo   a crash course
Go a crash course
 
Implementing Software Machines in C and Go
Implementing Software Machines in C and GoImplementing Software Machines in C and Go
Implementing Software Machines in C and Go
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
 
C questions
C questionsC questions
C questions
 
From java to kotlin beyond alt+shift+cmd+k - Droidcon italy
From java to kotlin beyond alt+shift+cmd+k - Droidcon italyFrom java to kotlin beyond alt+shift+cmd+k - Droidcon italy
From java to kotlin beyond alt+shift+cmd+k - Droidcon italy
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
 
c++ program for Canteen management
c++ program for Canteen managementc++ program for Canteen management
c++ program for Canteen management
 

Andere mochten auch

Internet segura
Internet seguraInternet segura
Internet seguraTeachers8
 
[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong
[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong
[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh PhongLê Thạch
 
Understand print based media production techniques and technology
Understand print based media production techniques and technologyUnderstand print based media production techniques and technology
Understand print based media production techniques and technologyJamesGamesStudios
 
MVT Presentation
MVT PresentationMVT Presentation
MVT Presentationmoohan007
 
Different forms of television advertising 2
Different forms of television advertising 2Different forms of television advertising 2
Different forms of television advertising 2spiderhead84
 

Andere mochten auch (8)

Carrière
CarrièreCarrière
Carrière
 
Internet segura
Internet seguraInternet segura
Internet segura
 
Apple pp
Apple ppApple pp
Apple pp
 
[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong
[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong
[Young Marketers Elite Program] Assignment 20.1-Hoang Thach - Huynh Phong
 
Understand print based media production techniques and technology
Understand print based media production techniques and technologyUnderstand print based media production techniques and technology
Understand print based media production techniques and technology
 
MVT Presentation
MVT PresentationMVT Presentation
MVT Presentation
 
12 production of ad media in various media
12 production of ad media in various media12 production of ad media in various media
12 production of ad media in various media
 
Different forms of television advertising 2
Different forms of television advertising 2Different forms of television advertising 2
Different forms of television advertising 2
 

Ähnlich wie Ss

Whats new in_csharp4
Whats new in_csharp4Whats new in_csharp4
Whats new in_csharp4Abed Bukhari
 
Embracing the-power-of-refactor
Embracing the-power-of-refactorEmbracing the-power-of-refactor
Embracing the-power-of-refactorXiaojun REN
 
Railway reservation
Railway reservationRailway reservation
Railway reservationSwarup Boro
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical FileFahad Shaikh
 
Microsoft Word Hw#1
Microsoft Word   Hw#1Microsoft Word   Hw#1
Microsoft Word Hw#1kkkseld
 
help me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdfhelp me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdfarihantmum
 
Spring data access
Spring data accessSpring data access
Spring data access명철 강
 
Multi client
Multi clientMulti client
Multi clientAisy Cuyy
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation systemPrashant Sharma
 
MultiClient chatting berbasis gambar
MultiClient chatting berbasis gambarMultiClient chatting berbasis gambar
MultiClient chatting berbasis gambaryoyomay93
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harianKhairunnisaPekanbaru
 
Implementing STM in Java
Implementing STM in JavaImplementing STM in Java
Implementing STM in JavaMisha Kozik
 
Presentation on template and exception
Presentation  on template and exceptionPresentation  on template and exception
Presentation on template and exceptionSajid Alee Mosavi
 

Ähnlich wie Ss (20)

C++ programs
C++ programsC++ programs
C++ programs
 
Whats new in_csharp4
Whats new in_csharp4Whats new in_csharp4
Whats new in_csharp4
 
C program
C programC program
C program
 
Embracing the-power-of-refactor
Embracing the-power-of-refactorEmbracing the-power-of-refactor
Embracing the-power-of-refactor
 
syed
syedsyed
syed
 
Railway reservation
Railway reservationRailway reservation
Railway reservation
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical File
 
Tu1
Tu1Tu1
Tu1
 
Microsoft Word Hw#1
Microsoft Word   Hw#1Microsoft Word   Hw#1
Microsoft Word Hw#1
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
 
help me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdfhelp me Java projectI put problem and my own code in the linkmy .pdf
help me Java projectI put problem and my own code in the linkmy .pdf
 
Spring data access
Spring data accessSpring data access
Spring data access
 
Multi client
Multi clientMulti client
Multi client
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
 
MultiClient chatting berbasis gambar
MultiClient chatting berbasis gambarMultiClient chatting berbasis gambar
MultiClient chatting berbasis gambar
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian
 
Fia fabila
Fia fabilaFia fabila
Fia fabila
 
Implementing STM in Java
Implementing STM in JavaImplementing STM in Java
Implementing STM in Java
 
Presentation on template and exception
Presentation  on template and exceptionPresentation  on template and exception
Presentation on template and exception
 
Pre zen ta sion
Pre zen ta sionPre zen ta sion
Pre zen ta sion
 

Kürzlich hochgeladen

Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...anilsa9823
 
Storyboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to SingStoryboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to SingLyneSun
 
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...akbard9823
 
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...akbard9823
 
Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...
Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...
Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...anilsa9823
 
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiFULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiSaketCallGirlsCallUs
 
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...anilsa9823
 
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...anilsa9823
 
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Servicesonnydelhi1992
 
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...anilsa9823
 
Jeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel ThrowingJeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel ThrowingJeremy Casson
 
Call girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room serviceCall girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room servicediscovermytutordmt
 
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...akbard9823
 
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...akbard9823
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboardthephillipta
 
Jeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson
 
Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...akbard9823
 
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...anilsa9823
 
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKRAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKedwardsara83
 
Editorial sephora annual report design project
Editorial sephora annual report design projectEditorial sephora annual report design project
Editorial sephora annual report design projecttbatkhuu1
 

Kürzlich hochgeladen (20)

Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
Lucknow 💋 Call Girls in Lucknow | Service-oriented sexy call girls 8923113531...
 
Storyboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to SingStoryboard short: Ferrarius Tries to Sing
Storyboard short: Ferrarius Tries to Sing
 
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
Hazratganj / Call Girl in Lucknow - Phone 🫗 8923113531 ☛ Escorts Service at 6...
 
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
Aminabad @ Book Call Girls in Lucknow - 450+ Call Girl Cash Payment 🍵 8923113...
 
Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...
Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...
Lucknow 💋 Russian Call Girls Sushant Golf City - 450+ Call Girl Cash Payment ...
 
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiFULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
 
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
Lucknow 💋 (Call Girls) in Mahanagar | Service-oriented sexy call girls 892311...
 
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...Lucknow 💋 best call girls in Lucknow  (Adult Only) 8923113531 Escort Service ...
Lucknow 💋 best call girls in Lucknow (Adult Only) 8923113531 Escort Service ...
 
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
 
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
Lucknow 💋 Call Girl in Lucknow 10k @ I'm VIP Independent Escorts Girls 892311...
 
Jeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel ThrowingJeremy Casson - Top Tips for Pottery Wheel Throwing
Jeremy Casson - Top Tips for Pottery Wheel Throwing
 
Call girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room serviceCall girls in Kanpur - 9761072362 with room service
Call girls in Kanpur - 9761072362 with room service
 
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
Hazratganj ] (Call Girls) in Lucknow - 450+ Call Girl Cash Payment 🧄 89231135...
 
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
Indira Nagar Lucknow #Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payme...
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboard
 
Jeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around Europe
 
Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...Patrakarpuram ) Cheap Call Girls In Lucknow  (Adult Only) 🧈 8923113531 𓀓 Esco...
Patrakarpuram ) Cheap Call Girls In Lucknow (Adult Only) 🧈 8923113531 𓀓 Esco...
 
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
Lucknow 💋 Call Girls in Lucknow ₹7.5k Pick Up & Drop With Cash Payment 892311...
 
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKRAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
 
Editorial sephora annual report design project
Editorial sephora annual report design projectEditorial sephora annual report design project
Editorial sephora annual report design project
 

Ss

  • 1. import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.io.*; import java.io.*; public class MoneyTransfer extends MIDlet implements CommandListener{ Display D; ///Registration Form F=new Form("Registration"); TextField t1=new TextField("Account No:","",20,TextField.ANY); TextField t2=new TextField("Date of Birth:","",20,TextField.ANY); TextField t3=new TextField("Password:","",20,TextField.PASSWORD); TextField t4=new TextField("Confirm Password:","",20,TextField.PASSWORD); TextField t5=new TextField("Your Security Code:","",20,TextField.PASSWORD); StringItem si=new StringItem("Message:",""); Command submit=new Command("Submit",Command.SCREEN,1); Command reset=new Command("Reset",Command.SCREEN,2); //////// ////Login Form F1=new Form("Sign In"); TextField t6=new TextField("Account No:","",20,TextField.ANY); TextField t7=new TextField("Password:","",20,TextField.PASSWORD); Command signin=new Command("Sign In",Command.SCREEN,1); StringItem msg=new StringItem("Message:",""); ////// List menu=new List("Menu",List.IMPLICIT); List usermenu=new List("Your Options",List.IMPLICIT); //account details Form AD=new Form("Your Accounts Details"); StringItem s1=new StringItem("Account No:",""); StringItem s2=new StringItem("Name:",""); StringItem s3=new StringItem("Birth Date:",""); StringItem s4=new StringItem("Address:",""); StringItem s5=new StringItem("Gender:",""); StringItem s6=new StringItem("Email Id:",""); StringItem s7=new StringItem("Date Ac:",""); StringItem s8=new StringItem("Type:",""); StringItem s9=new StringItem("Balance:",""); StringItem s10=new StringItem("Picture:",""); Image im=null; ImageItem mi=null; ////Money Transfer Form MT=new Form("Money Transfer"); StringItem from=new StringItem("Your Account No:",""); TextField to=new TextField("Account To:","",20,TextField.ANY); Command mtok=new Command("Ok",Command.SCREEN,1); Form MTT=new Form("Money Transfer Transaction"); StringItem t_from=new StringItem("Account No From:",""); StringItem t_from_name=new StringItem("Name:",""); StringItem t_to=new StringItem("Account No To:",""); StringItem t_to_name=new StringItem("Name:",""); Image im_to=null; ImageItem mi_to=null; StringItem cd=new StringItem("Date:",""); TextField amt=new TextField("Amount:","",20,TextField.NUMERIC); ////// public void startApp() { D=Display.getDisplay(this); ///registration
  • 2. F.append(t1); F.append(t2); F.append(t3); F.append(t4); F.append(t5); F.append(si); F.addCommand(submit); F.addCommand(reset); F.setCommandListener(this); ///// ///Login F1.append(t6); F1.append(t7); F1.append(msg); F1.addCommand(signin); F1.setCommandListener(this); ///// ///account detail/// AD.append(s1); AD.append(s2); AD.append(s3); AD.append(s4); AD.append(s5); AD.append(s6); AD.append(s7); AD.append(s8); AD.append(s9); AD.append(s10); ///money transfer MT.append(from); MT.append(to); MT.addCommand(mtok); MT.setCommandListener(this); /// ////User Menu/// usermenu.append("Account Details",null); usermenu.append("Transaction",null); usermenu.append("Money Transfer",null); usermenu.append("Main Menu",null); usermenu.append("Exit",null); usermenu.setCommandListener(this); /// //main menu menu.append("Registration",null); menu.append("Sign In", null); menu.setCommandListener(this); //// D.setCurrent(menu); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void commandAction(Command c,Displayable d) {if(c==List.SELECT_COMMAND && d==menu) {
  • 3. switch(menu.getSelectedIndex()) { case 0: D.setCurrent(F); break; case 1: D.setCurrent(F1); break; default: break; } } else if(c==List.SELECT_COMMAND && d==usermenu) {switch(usermenu.getSelectedIndex()) {case 0: con_acc ac=new con_acc(); ac.start(); break; case 1: break; case 2: from.setText(t6.getString()); D.setCurrent(MT); break; } } else if(c==submit) { connect cc=new connect(); cc.start(); } else if(c==reset) {t1.setString(""); t2.setString(""); t3.setString(""); t4.setString(""); t5.setString(""); si.setText(""); } else if(c==signin) {con_signin cs=new con_signin(); cs.start(); } } ///////////registration///// class connect extends Thread {public void run(){ try{ HttpConnection cn=(HttpConnection)Connector.open("http://localhost:8080/servlet/registration? acn="+t1.getString()+"&db="+t2.getString()+"&pwd="+t3.getString() +"&cpwd="+t4.getString()+"&sc="+t5.getString()); cn.setRequestMethod(HttpConnection.GET); if(cn.getResponseCode()==HttpConnection.HTTP_OK) { InputStream in=cn.openInputStream(); ByteArrayOutputStream b=new ByteArrayOutputStream();
  • 4. int i; while((i=in.read())!=-1) { b.write(i); } byte by[]=b.toByteArray(); String s=new String(by); si.setText(s); cn.close(); } else { si.setText("Connection Fail"); } } catch(Exception e) {si.setText(e+"");} } } ////////// ///////////signin///// class con_signin extends Thread {public void run(){ try{ HttpConnection cn=(HttpConnection)Connector.open("http://localhost:8080/servlet/signin? acn="+t6.getString()+"&pwd="+t7.getString()); cn.setRequestMethod(HttpConnection.GET); if(cn.getResponseCode()==HttpConnection.HTTP_OK) { InputStream in=cn.openInputStream(); ByteArrayOutputStream b=new ByteArrayOutputStream(); int i; while((i=in.read())!=-1) { b.write(i); } byte by[]=b.toByteArray(); String s=new String(by); if(s.equals("true")) { D.setCurrent(usermenu); }else{ msg.setText(s);} cn.close(); } else { si.setText("Connection Fail"); } } catch(Exception e) {si.setText(e+"");} } } //////////
  • 5. ///////////accounts detail///// class con_acc extends Thread {public void run(){ try{ HttpConnection cn=(HttpConnection)Connector.open("http://localhost:8080/servlet/account_details ?acn="+t6.getString()); cn.setRequestMethod(HttpConnection.GET); if(cn.getResponseCode()==HttpConnection.HTTP_OK) { InputStream in=cn.openInputStream(); ByteArrayOutputStream b=new ByteArrayOutputStream(); int i; while((i=in.read())!=-1) { b.write(i); } byte by[]=b.toByteArray(); String s=new String(by); String Fi[]=split(s); s1.setText(Fi[0]); s2.setText(Fi[1]); s3.setText(Fi[2]); s4.setText(Fi[3]); s5.setText(Fi[4]); s6.setText(Fi[5]); s7.setText(Fi[6]); s8.setText(Fi[7]); s9.setText(Fi[8]); s10.setText(Fi[9]); con_pic cp=new con_pic(); cp.start(); D.setCurrent(AD); cn.close(); } else { si.setText("Connection Fail"); } } catch(Exception e) {si.setText(e+"");} } } ////////// ///////////fetch picture///// class con_pic extends Thread {public void run(){ try{ HttpConnection cn=(HttpConnection)Connector.open("http://localhost:8080/mt/"+s10.getText()); cn.setRequestMethod(HttpConnection.GET); if(cn.getResponseCode()==HttpConnection.HTTP_OK) { InputStream in=cn.openInputStream(); ByteArrayOutputStream b=new ByteArrayOutputStream(); int i;
  • 6. while((i=in.read())!=-1) { b.write(i); } byte by[]=b.toByteArray(); try{ im=Image.createImage(by, 0, by.length); mi=new ImageItem("",im,ImageItem.LAYOUT_DEFAULT,""); AD.append(mi); }catch(Exception e){} cn.close(); } else { si.setText("Connection Fail"); } } catch(Exception e) {si.setText(e+"");} } } ////////// ///Split String String [] split(String s) {int i,count=0; for(i=0;i<s.length();i++) { char ch=s.charAt(i); if(ch==',') {count++;} } String Fi[]=new String[count+1]; Fi[0]=new String(); int j=0; for(i=0;i<s.length();i++) { char ch=s.charAt(i); if(ch!=',') {Fi[j]=Fi[j]+ch; } else {j++; Fi[j]=new String(); } } return(Fi);} //// }