Advertisement
danpalol

PolizzaFurtoIncendio

Nov 2nd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1.  
  2. public class PolizzaFurtoIncendio extends PolizzaBase{
  3.  
  4.  
  5. public PolizzaFurtoIncendio(String targa,int valore, int valoreFi){
  6. super (targa, valore);
  7. furin=valoreFi;
  8. }
  9. public int getPremioAnnuo(){
  10. return (super.getValoreRC()+furin)/100;
  11. }
  12.  
  13. public String toString(){
  14. return (super.toString()+"ValoreFurtoIncendio"+furin);
  15. }
  16.  
  17. public boolean equals(Object otherObject){
  18. if(otherObject==null) return false;
  19. if(getClass() != otherObject.getClass()) return false;
  20. PolizzaFurtoIncendio p = (PolizzaFurtoIncendio)otherObject;
  21. return furin.equals(p.furin);
  22.  
  23. }
  24. public Object clone(){
  25. return super.clone();
  26. }
  27.  
  28. private int furin;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement