Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package oop2016.contest1.gruppo23;
  7.  
  8. /**
  9.  *
  10.  * @author Alfonso
  11.  */
  12. public class AereoAMotore extends Aeromobile{
  13.     private final int numRotori;
  14.    
  15.     public AereoAMotore(String codice, int numRotori){
  16.         super(codice);
  17.         this.numRotori=numRotori;
  18.     }
  19.  
  20.     public int getNumRotori() {
  21.         return numRotori;
  22.     }
  23.  
  24.     @Override
  25.     public String toString() {
  26.         return super.toString()+ "- Tipo = Aereo a motore - Numero rotori = " + numRotori;
  27.     }
  28.    
  29.    
  30.    
  31.    
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement