All pastes #415344 Raw Edit

Stuff

public text v1 · immutable
#415344 ·published 2007-03-29 16:38 UTC
rendered paste body
import java.util.*; // Needed for Keyboard
import javax.swing.*; // Needed for JOpionPane

public class AcmeBankFINAL

{
	public static void main(String[] args)

	{
			
	double loanAmount = 0.0;
	double anInRate = 0.0;
	int numYears = 0;
	String repaymentMethod = "Monthly";
	boolean ozCitzen = true;
	boolean existingAnc = true;
	int overFifty = 40;
	

		//Scanner Keyboard = new Scanner(System.in); //Introducing Scanner naming string Keyboard
		
		String temp;
		
	temp = JOptionPane.showInputDialog("Requested Loan Amount");
	loanAmount = Double.parseDouble(temp); 
				
		//System.out.print("Requested Loan Amount: ");	
		//LoanAmount = Keyboard.nextDouble( );
	
	temp = JOptionPane.showInputDialog("Annual Interest rate");
	anInRate = Double.parseDouble(temp);
		
		//System.out.print("Annual Interest Rate: ");
		//AnInRate = Keyboard.nextDouble( );
	
	temp = JOptionPane.showInputDialog("Number of years over which the loan will be paid in");
	numYears = Integer.parseInt(temp);
	
		//System.out.print("The number of years over which the loan will be paid in: ");
		//NumYears = Keyboard.nextInt( );
	
	temp = JOptionPane.showInputDialog("Replayment method, either Quarterly, Monthly or Fortnightly");
	
		//RepaymentMethod = Keyboard.nextLine( );
		//System.out.print("Replayment method, either Quarterly = Q, Monthly = M or Fortnightly = F: ");
		//RepaymentMethod = Keyboard.nextLine( );
	
	 temp = JOptionPane.showInputDialog("Do you have an accounting account, true or false"); //String

		//System.out.print("Do you have an accounting account, Yes Or No: ");
		//ExistingAnc = Keyboard.nextLine( );

	 temp = JOptionPane.showInputDialog("Are you an Australian Citzen, true or false"); //Boolean
	 			
		//System.out.print("Are you an Australian Citzen, True or False: ");
		//OzCitzen = Keyboard.nextBoolean( );
	
	 temp = JOptionPane.showInputDialog("How old are you? In Number format"); //String
	
		//System.out.print("How old are you? (In Number format): ");
		//Overfifty = Keyboard.nextInt( );
	
//Special Characteristics
	
	if(existingAnc == true)
	{
	}
	else
	
	JOptionPane.showMessageDialog(null, "Existing Account: not eligible"); //Message to show loan not eligible
	
		//System.out.println("Existing Account: Sorry you are not eligible for a loan");
	
	if(ozCitzen == true)
	{
	}
	else

	JOptionPane.showMessageDialog(null, "Citzen:  not eligible");	//Message to show loan not eligible
	
		//System.out.println("Australian Citizen: Sorry you are not eligible for a loan");
	
	if(overFifty <= 50)
	{
	}
	else
	
	JOptionPane.showMessageDialog(null, "Age:  not eligible");	//Message to show loan not eligible
	
		//System.out.println("Age: Sorry you are not eligible for a loan");
	
	
//Output all Results
	
	}
	
	
	
}