5.FreeTicket:赠票子类,继承父类Ticket
获得赠票者的名字属性(CustomerName):string类型
重写父类计算票价CalcPrice()
重写父类打印售票信息Print()
重写父类显示当前出票信息Show()
- using System; using System.Collections.Generic;
- using System.Linq; using System.Text;
- using System.Threading.Tasks; using System.Windows.Forms;
- using System.IO;
- namespace 影院售票系统 {
- /// <summary> /// 赠票
- /// </summary> public class FreeTicket:Ticket
- { public FreeTicket() { }
- public FreeTicket(ScheduleItem sch,Seat seat,string name) {
- this.Seat = seat; this.CustomerName = name;
- this.ScheduItem = sch; }
- private string _customerName; /// <summary>
- /// 获得赠票者的名字 /// </summary>
- public string CustomerName {
- get { return _customerName; } set { _customerName = value; }










