package src.fr.impl.Parts;

import java.util.HashMap;

import src.fr.api.PartType;
import src.fr.impl.PartImpl;

public class Engine extends PartImpl {     
     /*public Engine(String name, CategoryImpl category, int price){
          super(new PartTypeImpl(name,Engine.class, category),price);
     }*/

     private static final HashMap<String,Integer> prices;
     static {
          prices = new HashMap<>();
          prices.put("EG100",19000);
          prices.put("EG122",22000);
          prices.put("EG210",25000);
          prices.put("ED110",18000);
          prices.put("ED180",20000);
          prices.put("EH120",25000);
      }

     public Engine(){
     }

     @Override
     public void setType(PartType type){
        this.type = type;
        this.price = prices.get(type.getName());
    }
}
