Question: Using C++ Question 3 Referring to Sample of Program at last page, complete the following questions: 1. Write a program to store information of Inter




Using C++
Question 3 Referring to Sample of Program at last page, complete the following questions: 1. Write a program to store information of Inter State Daily Pass records. The details of information needed are as follows: i. Applicant Name ii. IC/ Passport No iii. Contact No iv. Occupation Approver vi. Status V. 2. Complete a function named newPass (). This function should accept all input of struct data members stated above. During the data entry process, new application must be reviewed by one of the approvers stated below: i. PDRM ii. ATM As for struct's data member named status, this function will provide two (2) options for user to choose: Approved or Rejected. 3. Complete a function named registerPass.0. This function should add/register the new data into existing record. 4. Complete a function named displaypass() based on following conditions: Option 1 (individual): User will enter IC or Passport no as input and function will display the details of individual record. Option 2: Function will display all records. Complete the following questions: 1. Modify your struct by adding additional member named reason. The default value for this data member is 'NULL". Then, complete a function named updatePass 1). If the value of status is Rejected, user is compulsory to input the justification in string format and program should be able to initialize the input to data member reason. 2. Based on your solution in Question 3 (1), update the displaypass.l) function. Modify your answer in Question 2 (4) by adding Option 3: Function will display list of records based on type of status entered by user. 3. Complete a function named countPass (). This function should be able to count and display total number of Approved and Rejected pass. Sample of Program (Record.cpp) // suitable preprocessor (header) int main() { //create class object and variables do { choice = menu(); switch (choice) { case 1: //call function newPass() case 2: //call function displayPass () case 3: //call function updatePass () case 4: //call function countPass () } } while (choice != 5); } Sample of Program (DailyBasa.b) class Dabas /ode declaration 3550Gt Applicant 1/Question 3(1) 1/Question 4(1) public: //initialize both head and tail pointers to NULL DailyBasso start = NULL; end = NULL; 3 03 menu() { //display menu options 7/return user's choice } void 96vBaas ( 1/Question 3(2) // create a new node //accept user's data inputs 1/invoke Everlass) and send the new node's address 3 void sepiase&Bass ( suitable parameters-/) { 1/Question 3(3) //add new node to linked list 3 void display Bass ( suitable parameters:/) { 1/Question 3(4) I/Question 4(2) 3 void updateBass (/-suitable parameters:/) { 1/Question 4(1) 3 void seuns Bass ( suitable parameters-/) { 1/Question 4(3) 3 private: Applicant start, -end; 3; Question 3 Referring to Sample of Program at last page, complete the following questions: 1. Write a program to store information of Inter State Daily Pass records. The details of information needed are as follows: i. Applicant Name ii. IC/ Passport No iii. Contact No iv. Occupation Approver vi. Status V. 2. Complete a function named newPass (). This function should accept all input of struct data members stated above. During the data entry process, new application must be reviewed by one of the approvers stated below: i. PDRM ii. ATM As for struct's data member named status, this function will provide two (2) options for user to choose: Approved or Rejected. 3. Complete a function named registerPass.0. This function should add/register the new data into existing record. 4. Complete a function named displaypass() based on following conditions: Option 1 (individual): User will enter IC or Passport no as input and function will display the details of individual record. Option 2: Function will display all records. Complete the following questions: 1. Modify your struct by adding additional member named reason. The default value for this data member is 'NULL". Then, complete a function named updatePass 1). If the value of status is Rejected, user is compulsory to input the justification in string format and program should be able to initialize the input to data member reason. 2. Based on your solution in Question 3 (1), update the displaypass.l) function. Modify your answer in Question 2 (4) by adding Option 3: Function will display list of records based on type of status entered by user. 3. Complete a function named countPass (). This function should be able to count and display total number of Approved and Rejected pass. Sample of Program (Record.cpp) // suitable preprocessor (header) int main() { //create class object and variables do { choice = menu(); switch (choice) { case 1: //call function newPass() case 2: //call function displayPass () case 3: //call function updatePass () case 4: //call function countPass () } } while (choice != 5); } Sample of Program (DailyBasa.b) class Dabas /ode declaration 3550Gt Applicant 1/Question 3(1) 1/Question 4(1) public: //initialize both head and tail pointers to NULL DailyBasso start = NULL; end = NULL; 3 03 menu() { //display menu options 7/return user's choice } void 96vBaas ( 1/Question 3(2) // create a new node //accept user's data inputs 1/invoke Everlass) and send the new node's address 3 void sepiase&Bass ( suitable parameters-/) { 1/Question 3(3) //add new node to linked list 3 void display Bass ( suitable parameters:/) { 1/Question 3(4) I/Question 4(2) 3 void updateBass (/-suitable parameters:/) { 1/Question 4(1) 3 void seuns Bass ( suitable parameters-/) { 1/Question 4(3) 3 private: Applicant start, -end; 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
