S
S. Gregory
I am having difficulty when attempting to create an Array in the
following source code.
FIRST CLASS CREATED....................
import java.text.*;
public class MortgageCalculation {
public double loanAmount;
public double interestRate;
public int loanTerm;
//More variables are listed, but they are declared private for the
calculations.
public void displayPayment()throws Exception {
//Math formulas go here
//End of this class
SECOND CLASS THAT IS USED FOR DISPLAY OF MORTGAGE AMOUNTS.....
class MortgageDisplay {
public static void main(String[] arguments)throws Exception {
MortgageCalculation loanOne = new MortgageCalculation();
MortgageCalculation loanTwo = new MortgageCalculation();
MortgageCalculation loanThree = new MortgageCalculation();
loanOne.loanAmount = 200000.00; // Here is where I set the
variables.
loanTwo.loanAmount = 200000.00; // I would like to type this amount
once since it is utilized by all three loans.
loanThree.loanAmount = 200000.00;
loanOne.loanTerm = 84;
loanTwo.loanTerm = 180;
loanThree.loanTerm = 360; //How can I create an array for all
three?????
loanOne.interestRate = .0535;
loanTwo.interestRate = .0550; //I think you get the picture..
Please help?? After a few days in books I have come up short and need
the help of someone with more expirence. Thank You.
following source code.
FIRST CLASS CREATED....................
import java.text.*;
public class MortgageCalculation {
public double loanAmount;
public double interestRate;
public int loanTerm;
//More variables are listed, but they are declared private for the
calculations.
public void displayPayment()throws Exception {
//Math formulas go here
//End of this class
SECOND CLASS THAT IS USED FOR DISPLAY OF MORTGAGE AMOUNTS.....
class MortgageDisplay {
public static void main(String[] arguments)throws Exception {
MortgageCalculation loanOne = new MortgageCalculation();
MortgageCalculation loanTwo = new MortgageCalculation();
MortgageCalculation loanThree = new MortgageCalculation();
loanOne.loanAmount = 200000.00; // Here is where I set the
variables.
loanTwo.loanAmount = 200000.00; // I would like to type this amount
once since it is utilized by all three loans.
loanThree.loanAmount = 200000.00;
loanOne.loanTerm = 84;
loanTwo.loanTerm = 180;
loanThree.loanTerm = 360; //How can I create an array for all
three?????
loanOne.interestRate = .0535;
loanTwo.interestRate = .0550; //I think you get the picture..
Please help?? After a few days in books I have come up short and need
the help of someone with more expirence. Thank You.