Q:

covert the following uml Car class diagram to java programming language code

0

covert the following uml Car class diagram to java programming language code:

All Answers

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

public class Car {
   private String make;
   private String model;
   private int year;
   
   public Car()
   {}
   public void setMake(String m)
   {
       make=m;
   }
   public void setModel(String m)
   {
       model=m;
   }
   public void setYear(int y)
   {
       year=y;
   }
   public String getMake()
   {
       return make;
   }
   public String getModel()
   {
       return model;
   }
   public int getYear()
   {
       return year;
   }
}

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

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now