Showing posts with label JAVA FUNCTION. Show all posts
Showing posts with label JAVA FUNCTION. Show all posts

Sunday, 5 June 2011


Java  Program For ATM TransAction Using Functions And Call By Value

Code:
/*
 *Java  Program For ATM TransAction Using Functions And Call By Value
 */
public class ATM
{
 public static void Welcome()
 {
   System.out.println("**********GREETINGS**********");
   System.out.println("WELCOME TO THE ROCKTHEIT BANK");
}

 public static void TransAction(int age,double dep,double wit)
    {
        if (age > 18)
        {
        double bal=10000;//Calculate
        double amt=(bal+dep);
        double rembal=(amt-wit);
        if(dep>0)
        System.out.println("You Have Deposited An Amount of Rs."+dep+" In Your ROCKTHEIT Bank Account");
        else
        System.out.println("You Have Not Deposited Any Amount In Your ROCKTHEIT Bank Account");
       
        System.out.println("Your Balance After Deposition Is Rs."+amt);
       
        if(wit>0)
        System.out.println("You Have Withdrawn An Amount Of Rs."+wit+" From Your ROCKTHEIT Bank Account");
        else
        System.out.println("You Have Not Withdrawn Any Amount From Your ROCKTHEIT Bank Account");
       
        System.out.println("Your Remaining Balance Is Rs."+rembal);
        System.out.println("Thank You For Using The ROCKTHEIT Bank ATM");
        System.out.println("**********HAVE A GOOD DAY**********");
    }
    else
    {
       System.out.println("You Arue Underaged");
    }
    }
    public static void main(int age,double deposit,double withdrawn)//input from BlueJ interface
    {
        Welcome();
        TransAction(age,deposit,withdrawn);//Call By Value
    }
}//End of Class

Comment bellow for your query and feedback... :)
Prof.Mahendra Kanojia

This is simple java program explaining calling with simple application of calculator with different operators
code shared by UMANG MISTRY X(VISSANJI ACADEMY)

Code:
/*
 *this is simple java program explaining calling with simple application of calculator with different operators
 */
Prof.Mahendra Kanojia

Tuesday, 17 May 2011


This code shared by Umang Mistry (Vissanji Academy)X B.
This is a java program under the sub topic Function
this is to show an example on the topic calling (call by refrence)& returning
Prof.Mahendra Kanojia