Answer to Question #39989 in C++ for moalosi tshipe
The output file should be in such that each entry is in a single line. Each line contains surname, name (including middle names) and Omang number separated by space. HINTS
1. When reading and writing to a file, the input file should be in the same location with your program, e.g. the .txt file should be saved in the same location/ folder where the program appears, otherwise the compile won’t see the input file.
2. The length of the file is not fixed, so your program should be able to read any file of any length.
3. To determine which entry is a male or female from the input file, if the fifth digit of the ID is 1, then the person is male, if its 2 then it’s a female.
4. INVALID ENTRIES:
a. ID is not equal to 9 digits
b. ID has other characters that are not numbers
c. The fifth digit of the ID is not either 1 or 2.
5. A test file is provided in blackboard, so u can use it to test your programs. Note that a longer test file can be used, so don’t fix the length of your file to the one provided on blackboard
Unfortunately, your question requires a lot of work and cannot be done for free.
Please submit it with all requirements as an assignment to our control panel and
we'll assist you.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!