Using system;
namespace Pattern {///
}
public abstract class Equipment {private string name; // Nett public abstract double netPrice (); // discounted prices on public abstract double discountPrice (); // member increases method public bool add (Equipment equipment) {return false;} // Deleting Parts Method Public Bool Remove (Equipment Equipment) {Return False;} // Note Here, here is provided with a component method for accessing a combined body class. Public equipment (string name) {this.name = name;} public string getname () {return this.name;}}
Public Class EQ1: Equipment {public EQ1: Base (name) {} public override double discountprice () {Return 80;} public override double netprice () {return 100;}
}
Public class EQ2: Equipment {public EQ2: Base (name) {} public override double discountprice () {return 800;} public override double netprice () {Return 1000;}
}