Question: void readOption ( char &option ) . This function will read an option and return to the called function through the reference parameter. You must
void readOptionchar &option
This function will read an option and return to the called function through the reference parameter.
You must do validation to make sure that the character is Ee or Qq and nothing other than that. Use a while loop to do this.
void encodechar encodeFileName
This should be a void function that takes char array encodeFileName.
Declare appropriate local variables.
Call the readInput function to read students names and lateFlag.
Call the readInput function to read Student ID and filename.
Call the readTime function to read the submitted time.
Fill the encodeFileName array based on the six pieces of information adding underscores between.
Start with the students names, if the assignment is late, put LATE in the filename and nothing otherwise, add the parsed Student ID add the time, without the colon, and then finally add the filename.
For example: If late: smithsueLATEprogc
If it is not late: smithsueprogc
Use strncpy and strcat functions refer to Sections and CString library functions in your zyBooks. Look at my example code file.
void readInputchar fName char lName bool &lateFlag overloaded function
This void function should take char arrays and bool variable by reference.
It reads the students first name, last name and if the assignment is late or not. Student last name eg Smithchar array Student first name eg Suechar array
Make sure all character data for the students name is lowercase you may write a function to convert a cstring to all lowercase.
If the assignment was late or not eg Y or Nbool var Must do data validation for this.
Hint: Remember an overloaded function has the same function name but different types of parameters or the number of parameters are different.
void readInputchar parsedID char fileName overloaded function
This void function should take char array for the parsed digit Student ID that will be returned and another char array for the filename.
The Student ID egchar array is a local variable. Use the strncpy function to copy from position till the end of the string. strncpyparsedID stdID will copy characters from the th position in the stdID string to the parsedID string. Check out this example code file.
The name of the file eg progcppchar array
void readTimechar strTime
This is a void function that should read the time from the user as integers and return one char array by reference that is the strTime array
The time read from the user will be in military time eg: for :pm ints, one for hour and one for mins Check out this example code file to extract the numbers and convert them to a cstring. This example is not quite sophisticated. You must do data validation by checking the hours are between and and the minutes are between and
This function must do data validation for the numbers and the HH:MM format. Make sure the colon : is used to separate the mins and hours.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
