34 lines
947 B
Java
34 lines
947 B
Java
|
|
import java.io.*;
|
|
|
|
public class LoanApplication
|
|
{
|
|
private Loan m_loan;
|
|
private String m_summary;
|
|
|
|
public void run()
|
|
{
|
|
try
|
|
{
|
|
for (;;)
|
|
{
|
|
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
|
System.out.println("Please enter the applicant's name (enter nothing to quit):");
|
|
String name = br.readLine();
|
|
if (name.equals(""))
|
|
break;
|
|
|
|
System.out.print("Enter the interest rate: ");
|
|
double rate = Double.parseDouble(br.readLine());
|
|
|
|
System.out.print("Enter the number of years: ");
|
|
int years = Integer.parseInt(br.readLine());
|
|
|
|
System.out.print("Enter the principal balance: ");
|
|
double principal = Double.parseDouble(br.readLine());
|
|
}
|
|
}
|
|
catch (Exception e) { }
|
|
}
|
|
}
|