
#include #include #include #include using namespace std; class Rnd// 랜덤숫자를 만드는 클레스 { private: int start; int end; public: Rnd() { start =0;end = 9; } void setRange(int pStart, int pEnd) { start = pStart; end = pEnd; } int getRNumber() { int rn = (int)( (rand() % (end-start+1)) + start ); return rn; } }; class SEQ_R//SEQ-R에대한 클래스 { private: int num; // 채널 개수 int a; // 노드 개수 int* numarr; // 채널 배열 ..

Problem#1 Bingo Game ( 빙고 게임 ) #include #include #include #include using namespace std; class Rnd { private: int start; int end; public: Rnd()//생성될떄 1~25 까지 범위 초기화 { start =1;end = 25; } int getRNumber()//난수생성 { int rn = (int)( (rand() % (end-start+1)) + start ); return rn; } }; class Bingo { private: int bingoNum[5][5]; // 임의로 생성된 숫자를 저장하는 배열 int nStatus[5][5]; // bingoNum[5][5]의 숫자가 불렸는지를 체크하는..

Problem#1 RFID Anti-collision, Query Tree Protocol (RFID 충돌방지기법, 질문트리프로토콜) #include #include #include #include #include #include using namespace std; int IDENTIFICATION = 0; //1개의 노드가 응답한 횟수 //스택 class Reader { // 질의 주머니 int cycle; // 2개이상 노드가 응답한 횟수 int IDLE; // 0개의 노드가 응답한 횟수 int COLLISION; string temp; // 스택에서 꺼낸 수를 저장 stack g; public: Reader();//기본생성자 Reader(int); // 변환생성자 Reader(Reader& R);..