Advertisement
Guest User

Untitled

a guest
Mar 5th, 2012
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. import static org.junit.Assert.*;
  2.  
  3. import org.junit.Test;
  4.  
  5.  
  6. public class Annuity {
  7.  
  8. public double pPayment;
  9. public int pTerm;
  10. public double rate;
  11. public int pType;
  12.  
  13.  
  14. public void getOrdinaryAnnuity()
  15. {
  16. pPresentValue = pPayment * ( 1 - (Math.pow(1 + rate), term)))
  17.  
  18. }
  19.  
  20. public void AnnuityDue()
  21. {
  22.  
  23. }
  24.  
  25. public void setPayment(double value)
  26. {
  27. pPayment = value;
  28. }
  29.  
  30. public double getPayment()
  31. {
  32. return pPayment;
  33. }
  34.  
  35. public void setTerm(int value)
  36. {
  37. pTerm = value;
  38. }
  39.  
  40. public int getTerm()
  41. {
  42. return pTerm;
  43. }
  44.  
  45. public void setRate(double value)
  46. {
  47. rate = value;
  48. }
  49.  
  50. public double getRate()
  51. {
  52. return rate;
  53. }
  54.  
  55. public void setType(int value)
  56. {
  57. pType = value;
  58. }
  59.  
  60. public int getType()
  61. {
  62. return pType;
  63. }
  64.  
  65. public int getPVOFactor()
  66. {
  67. pPVOFactor = (1 - (1 / (Math.pow((1 + rate), pTerm))));
  68. }
  69.  
  70. public void getPVOFactor(double rate, int pTerm)
  71. {
  72. return pPVOFactor;
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement