C#影院售票系统毕业设计(1)

2019-12-30 11:02:24王冬梅

     6.购票和打印电影票

     7.继续购票

(5)测试

二、类的设计

 献上这9个类的代码,根据依赖编写类的顺序,不能完全按照上面顺序

1.Seat:保存影院的座位信息,主要属性如下

座位号(SeatNum):string类型

座位卖出状态颜色(Color):System.Drawing.Color类型
 

  1. using System;   using System.Collections.Generic; 
  2.  using System.Linq;   using System.Text; 
  3.  using System.Threading.Tasks;   using System.Drawing; 
  4.     namespace 影院售票系统 
  5.  {   /// <summary> 
  6.  /// 保存影院的座位信息   /// </summary> 
  7.  public class Seat   { 
  8.  public Seat() { }   public Seat(string seatNum,Color color)  
  9.  {   this.SeatNum = seatNum; 
  10.  this.Color = color;   } 
  11.  private string _seatNum;   /// <summary> 
  12.  /// 座位号   /// </summary> 
  13.  public string SeatNum   { 
  14.  get { return _seatNum; }   set { _seatNum = value; } 
  15.  }   private Color _color; 
  16.  /// <summary>   /// 座位卖出状态颜色 
  17.  /// </summary>   public Color Color 
  18.  {   get { return _color; } 
  19.  set { _color = value; }   } 
  20.  }   } 
?

2.Movie:电影类

电影名(MovieName):string类型