Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PolizzaFurtoIncendio extends PolizzaBase{
- public PolizzaFurtoIncendio(String targa,int valore, int valoreFi){
- super (targa, valore);
- furin=valoreFi;
- }
- public int getPremioAnnuo(){
- return (super.getValoreRC()+furin)/100;
- }
- public String toString(){
- return (super.toString()+"ValoreFurtoIncendio"+furin);
- }
- public boolean equals(Object otherObject){
- if(otherObject==null) return false;
- if(getClass() != otherObject.getClass()) return false;
- PolizzaFurtoIncendio p = (PolizzaFurtoIncendio)otherObject;
- return furin.equals(p.furin);
- }
- public Object clone(){
- return super.clone();
- }
- private int furin;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement