Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Auto extends Veicolo {
- private boolean compatta;
- public Auto(String targa, boolean compatta) throws VeicoloException {
- super(targa);
- this.compatta = compatta;
- }
- public Auto(String targa) throws VeicoloException {
- this(targa, true);
- }
- @Override
- public int getTempoSmaltimento() {
- if (compatta)
- return 1;
- else
- return 3;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement