help to develop the GUI for this code

Java Application samples, news and tutorials. Real world free applications Developed in Java.
  • Ads

help to develop the GUI for this code

Postby placidphyll » Mon Nov 16, 2009 2:10 pm

my application allows a student to open a savings account , the student has to submit his or her names,faculty,course,year of study,university,telephone contact and email address. the student can withdraw ,deposit and perform balance enquiries with the account, but i want any one to help me develop the GUI for this code,
thanks
Code: Select all
import java.util.InputMismatchException;
import java.util.Scanner;

public class savingsAccount

{
   
void display()


{

   
Scanner input = new Scanner(System.in);
      boolean continueloop = true;
      do
      {
         try
         {
            System.out.println("  enter name  ");
            String name = input.next();
            System.out.println("   year of study  .");
          int year = input.nextInt();
               System.out.println("   enter faculty   ");
            String faculty = input.next();
            System.out.println("  enter course   ");   
            String course = input.next();
            System.out.println("  enter university  ");
            String university = input.next();
            System.out.println("  enter telephone no  .");
            int telephone = input.nextInt();
            System.out.println("  enter email address  ");
            String emailAddress = input.next();
            System.out.println("  enter physical address  ");
            String paddress = input.next();
         System.out.println("");
            
         
            //   continueloop = false;
               
System.out.println(" thanks for creating an account");
System.out.println("");
System.out.println(" enter deposit");
   double savings =0;
   double deposit = input.nextInt();
   
   //System.out.println("do you want to check yo balance");
      savings=savings+deposit;
   System.out.println("");
      
   System.out.println(" your savings is "+ savings );


System.out.println("");
   System.out.println("   do you want to withdraw  " );
   System.out.println("");
      System.out.println(" enter amount you want to withdraw  ");
      
      int withdraw = input.nextInt();
      
   double   withdrawal=savings -withdraw;
   System.out.println("   you have withdrawn"+" " + withdraw +" "+" shillings "+" "+"and your balance is"+ " " +withdrawal);
   System.out.println("");
   System.out.println("");
   continueloop = false;
   
   
      }
         catch (InputMismatchException inputMismatchException)
         {
            System.err.printf("\nException: %s\n", inputMismatchException);
            input.nextLine();
            
            System.out.println(" ");
            System.out.println(" you must enter correct datatype . pliz try again \n");
         }
         `
      } while ( continueloop);
   }
}

this code implements the above one


class createSavingsAccount
{
   public static void main(String [] args){
      
         
      savingsAccount student= new savingsAccount();
      student.display();
      }
   }







thanks for any help rendered
placidphyll
 
Posts: 1
Joined: Mon Nov 16, 2009 1:43 pm

Return to Java Applications

Who is online

Users browsing this forum: No registered users and 1 guest

  • Ads