ios开发设计电影院

Cinema.h 文件
#import <Foundation/Foundation.h>
#import "Film.h"
enum FilmRoom
{
    /**用来存储影厅号,下面依次代表1-7号影厅*/
    FilmRoomWithOne = 1,
    FilmRoomWithTwo = 2,
    FilmRoomWithThree = 3,
    FilmRoomWithFour = 4,
    FilmRoomWithFive = 5,
    FilmRoomWithSix = 6,
    FilmRoomWithSeven = 7
    //...可以再添加
};

typedef enum FilmRoom  FilmRoom;


@interface Cinema : NSObject
{
    //声明类的成员变量 属性:名称、票价、排数、座位号、影厅
    
    /**用来存储电影的名称实例变量*/
    NSString * _name;
    
    //int _price;//用来存储电影票价
    
    /**用来存储座位排数实例变量*/
    int _rowNumber;
    
    /**用来存储座位号实例变量*/
    int _seatNumber;
    
    /**用来存储影厅号实例变量*/
    FilmRoom _filmRoom;
    
    /**用来存储电影实例变量*/
    Film * _film;
}

-(id)initWithFilm:(Film *)film;
-(void)setFilm:(Film *)film;
-(Film *)film;
-(Film *)informationAboutFilm:(Film *)film;



/*set\get方法的声明*/

/**提供电影名称的set方法*/
-(void)setName:(NSString *)name;
-(NSString *)name;

/**提供电影票价的set方法*/
-(void)setPrice:(int)price;
-(int)price;

/**提供电影院位排数的set方法*/
-(void)setRowNumber:(int)rownumber;
-(int)rowNumber;

/**提供影厅座位号的set方法*/
-(void)setSeatNumber:(int)seatNumber;
-(int)seatNumber;


//方法:选择电影、选择影厅、选择座位、打印票据

/**影厅选择*/
-(void)filmWithPlayFileRoom:(FilmRoom)filmRoom;

/**选择电影*/
//-(void)FilmWIthSelectFilmName:()selectFilmName;

+(NSString *)getFilmRoom:(FilmRoom)filmRoom;


@end

你可能感兴趣的:(函数,设计,ios开发,枚举类型,Foundation框架)