A testing service planned to conduct a recruitment test for both male and female candidates. Two different persons are assigned for the clearance of candidates in examination hall. Invigilator ’M’ will be assigned for male candidates while Invigilator ’F’ will be assigned for female candidates. In both cases candidates will be served on first come and first serve basis. Equal number of male and female candidates will appear in test and each invigilator will verify 25 candidates for the test.
Write C++ program to implement the above scenario. Your program should use array to implement above scenario. It should be clear that candidates will be added on rear side of the queue and will be served from front of the queue
· Implement queue using array
· Use two classes named “Candidate” and “CandidateQueue”
· There will be candidate information Roll_No, Name, Gender and Last_Degree in “Candidate” class.
· recordInfo(): Record candidate information (details) into object of Candidate class
· CandidateQueue class should be used for save candidates into queue
· Create two objects of CandidateQueue class to make queue of male and female candidates.
· Create insertIntoQ() function to check the gender of candidate and insert into relevant queue
· Create makeQueue() method of queue class to insert candidates into queue.
· Create Display_ Invigilator_M( ) function to display all male candidates.
· Create Display_ Invigilator_F( ) function to display all female candidates
· To display candidates of a queue use removeFromQ() method
· Create Total_Candidates( ) function to display total number of candidates in both queues
· Each queue should be filled based on gender.
· In above instructions the term “function” refers to a method that is not member of any class. On the other hand the term “Method” refers to a function that is part of a class.
Note: Please see the attached Demo Video for the program output.