compiling

git-svn-id: svn://anubis/gvsu@72 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-03-20 04:35:48 +00:00
parent ef0daa84b2
commit 44793226d8
6 changed files with 39 additions and 5 deletions

View File

@ -1,6 +1,11 @@
public class AmortizedLoan extends Loan public class AmortizedLoan extends Loan
{ {
public AmortizedLoan(String name, double rate, int years, double amount)
{
super(name, rate, years, amount);
}
public void calcMonthlyPayment() public void calcMonthlyPayment()
{ {
} }

View File

@ -21,6 +21,8 @@ public abstract class Loan
return makeSummary(); return makeSummary();
} }
public abstract void calcMonthlyPayment();
public String makeSummary() public String makeSummary()
{ {
return "Summary!"; return "Summary!";

View File

@ -1,5 +1,5 @@
import java.util.BufferedReader; import java.io.*;
public class LoanApplication public class LoanApplication
{ {
@ -8,6 +8,26 @@ public class LoanApplication
public void run() 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) { }
} }
} }

View File

@ -1,6 +1,8 @@
all: all: *.class
javac *.java
%.class: %.java
javac $^
.PHONY: javadoc .PHONY: javadoc
javadoc: javadoc:

View File

@ -3,7 +3,7 @@ public class Project3
{ {
public static void main(String[] args) public static void main(String[] args)
{ {
LoadApplication la = new LoanApplication(); LoanApplication la = new LoanApplication();
la.run(); la.run();
} }
} }

View File

@ -1,6 +1,11 @@
public class SimpleLoan extends Loan public class SimpleLoan extends Loan
{ {
public SimpleLoan(String name, double rate, int years, double amount)
{
super(name, rate, years, amount);
}
public void calcMonthlyPayment() public void calcMonthlyPayment()
{ {
} }