Q:

?Using Java create and implement the methods of the Vehicle class

0

Using Java Create and implement the methods of the Vehicle class ?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

package myVehicle;
import java.time.LocalDate;
public class Vehicle {
    private String name;
    private LocalDate dateOfManufactuing;
     public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
     public void setDateOfManufactuing(LocalDate dateOfManufactuing) {
       this.dateOfManufactuing = dateOfManufactuing;
    } 
     public LocalDate setDateOfManufactuing() {
        return dateOfManufactuing;
    } 
    public int comparecars(Car c1,Car c2){ 
     return  c1.compareTo(c2);
     }
 }

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now