2019-11-03 06:20:17 +00:00
|
|
|
|
#include "Iterator.h"
|
|
|
|
|
|
|
|
|
|
Television::Television(){}
|
|
|
|
|
|
|
|
|
|
Television::Television(vector<string> iChannelList){
|
|
|
|
|
this->channelList = iChannelList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Iterator* Television::createIterator(){
|
|
|
|
|
RemoteControl *it = new RemoteControl();
|
|
|
|
|
it->setTV(this);
|
|
|
|
|
return (Iterator*)it;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int Television::getTotalChannelNum(){
|
|
|
|
|
return channelList.size();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Television::play(int i){
|
2021-04-04 13:09:08 +00:00
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>ţ<EFBFBD>%s<><73><EFBFBD><EFBFBD>\n", channelList[i].c_str());
|
2019-11-03 06:20:17 +00:00
|
|
|
|
}
|