compiling
git-svn-id: svn://anubis/gvsu@72 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
ef0daa84b2
commit
44793226d8
@ -1,6 +1,11 @@
|
||||
|
||||
public class AmortizedLoan extends Loan
|
||||
{
|
||||
public AmortizedLoan(String name, double rate, int years, double amount)
|
||||
{
|
||||
super(name, rate, years, amount);
|
||||
}
|
||||
|
||||
public void calcMonthlyPayment()
|
||||
{
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ public abstract class Loan
|
||||
return makeSummary();
|
||||
}
|
||||
|
||||
public abstract void calcMonthlyPayment();
|
||||
|
||||
public String makeSummary()
|
||||
{
|
||||
return "Summary!";
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
import java.util.BufferedReader;
|
||||
import java.io.*;
|
||||
|
||||
public class LoanApplication
|
||||
{
|
||||
@ -8,6 +8,26 @@ public class LoanApplication
|
||||
|
||||
public void run()
|
||||
{
|
||||
BufferedReader br = new BufferedReader(System.in);
|
||||
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) { }
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
all:
|
||||
javac *.java
|
||||
all: *.class
|
||||
|
||||
%.class: %.java
|
||||
javac $^
|
||||
|
||||
.PHONY: javadoc
|
||||
javadoc:
|
||||
|
@ -3,7 +3,7 @@ public class Project3
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
LoadApplication la = new LoanApplication();
|
||||
LoanApplication la = new LoanApplication();
|
||||
la.run();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,11 @@
|
||||
|
||||
public class SimpleLoan extends Loan
|
||||
{
|
||||
public SimpleLoan(String name, double rate, int years, double amount)
|
||||
{
|
||||
super(name, rate, years, amount);
|
||||
}
|
||||
|
||||
public void calcMonthlyPayment()
|
||||
{
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user