SHARE
TWEET

empleadosPorComision

a guest May 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package pART;
  2.  
  3. /**
  4.  * @author dan_d_000
  5.  * TODO quitar extend, comprobar ventas mayores a 0 y tarifa menor qu uno y mayor a 0 y establecer salario base
  6.  */
  7. public class empleadosPorComision extends Object {
  8.     private String nName;
  9.     private String dadN;
  10.     private String insNum;
  11.     private double bruteSales;
  12.     private double comisTarif;
  13.    
  14.     public empleadosPorComision(String name,String dadn,String momn,String insnum,double bs,double tariffs) {
  15.         nName=name;
  16.         dadN=dadn;
  17.         insNum=insnum;
  18.         setBruteSales(bs);
  19.         setComisTarif(tariffs);
  20.     }
  21.    
  22.     public void setName (String N) {
  23.         nName=N;
  24.     }
  25.     public String getName () {
  26.         return nName;
  27.     }
  28.     public void setDadN (String N) {
  29.         dadN=N;
  30.     }
  31.     public String getDadN () {
  32.         return dadN;
  33.     }
  34.     public void setInsNum (String N) {
  35.         insNum=N;
  36.     }
  37.     public String getInsNum () {
  38.         return insNum;
  39.     }public void setBruteSales (double N) {
  40.         bruteSales=N;
  41.     }
  42.     public double getBruteSales () {
  43.         return bruteSales;
  44.     }public void setComisTarif (double N) {
  45.         comisTarif=N;
  46.     }
  47.     public double getComisTarif () {
  48.         return comisTarif;
  49.     }
  50.    
  51.     public double profits () {
  52.         return comisTarif*bruteSales;
  53.     }
  54.    
  55.     public String toString() {
  56.         return String.format("empleado por comisiĆ³n ",nName,dadN," Numero de seguro ",insNum," ventas brutas ",bruteSales," tarifa por comision ",comisTarif);
  57.     }
  58.    
  59. }
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
 
Top