SHARE
TWEET

Untitled

a guest Apr 19th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.codemonkey.model;
  2.  
  3.  
  4. import lombok.Getter;
  5. import lombok.Setter;
  6. import lombok.ToString;
  7. import lombok.AllArgsConstructor;
  8. import lombok.NoArgsConstructor;
  9.  
  10.  
  11. @AllArgsConstructor
  12. @NoArgsConstructor
  13. @ToString
  14. public class Economica{
  15.     @Setter @Getter private double presente;
  16.     @Setter @Getter private double tasa;
  17.     @Setter @Getter private int periodo;
  18.  
  19.     public double getFuturo(){
  20.         return Math.floor(this.presente*Math.pow(1+this.tasa/100,this.periodo));
  21.     }
  22.  
  23.     public double getRedito(){
  24.         return (this.getFuturo()-this.presente)/this.presente;
  25.     }
  26.  
  27.    
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top