title: Method override returns null
body: <p>I'm newbie in Java. So question might sound simple, but I'm stuck and can not figure out why this code returns null and 0.0 ?</p>
  
  <p>file: Transport.java</p>
  
  <pre>public class Transport {
  
          private String name;
          private double price;
  
      public Transport(String name, double price) {
          this.name = name;
          this.price = price;
      }
  
      public String carName() {
          return name;
      }
  
      public double carPrice(){
          return price;
      }
  }</pre>
  
  <p>file: Car.java</p>
  
  <pre>public class Car extends Transport{
  
      protected String name;
      protected double price;
  
      public Car(String name, double price) {
          super(name, price);
      }
  
      @Override
      public String carName(){
          return name;
      }
  
      @Override
      public double carPrice(){
          return price * 1.5;
      }
  }</pre>
  
  <p>file: Main.java</p>
  
  <pre>public class Main {
      public static void main(String[] args) {
  
          Car c = new Car("CarBrand", 1000);
  
          System.out.println("Name: " + c.carName());
          System.out.println("Price: " + c.carPrice());
      }
  }</pre>
  
  <p>Output</p>
  
  <pre>Name: null
  Price: 0.0</pre>