public override void Visit(AbstractPCComponent obj) { if (!(obj is T newobj)) { return; } newobj.Price -= (newobj.Price * Discount / 100); }
public void Add(AbstractPCComponent c) { // c.Parent = this; Children.Add(c); }