public float totalCost() {
   float total = material.getPrice() * this.getStock();
   return (float) (Math.round(total * 100)) / 100;
 }