public float getWidgetPrice() { float fTotalPrice = _Price; if (_painted.getIsPlated() == true) { fTotalPrice += _painted.GetTotalPrice(); } return(fTotalPrice); }
public void GetPainted() { if (_painted.paint.Equals(Painted.Paint.painted) == true) { Console.WriteLine("The Gadget is " + _painted.paint.ToString() + " " + _painted.color.ToString()); } else if (_painted.paint.Equals(Painted.Paint.plated) == true) { Console.WriteLine("The Gadget is " + _painted.paint.ToString() + " and has a surcharge of " + _painted.GetTotalPrice().ToString("C2")); } else { Console.WriteLine("The Gadget is " + _painted.paint.ToString()); } }