Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import static org.junit.Assert.*;
- import org.junit.Test;
- public class Annuity {
- public double pPayment;
- public int pTerm;
- public double rate;
- public int pType;
- public void getOrdinaryAnnuity()
- {
- pPresentValue = pPayment * ( 1 - (Math.pow(1 + rate), term)))
- }
- public void AnnuityDue()
- {
- }
- public void setPayment(double value)
- {
- pPayment = value;
- }
- public double getPayment()
- {
- return pPayment;
- }
- public void setTerm(int value)
- {
- pTerm = value;
- }
- public int getTerm()
- {
- return pTerm;
- }
- public void setRate(double value)
- {
- rate = value;
- }
- public double getRate()
- {
- return rate;
- }
- public void setType(int value)
- {
- pType = value;
- }
- public int getType()
- {
- return pType;
- }
- public int getPVOFactor()
- {
- pPVOFactor = (1 - (1 / (Math.pow((1 + rate), pTerm))));
- }
- public void getPVOFactor(double rate, int pTerm)
- {
- return pPVOFactor;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement