- 2

C++ array and etc.Can any professional give some hint or coding to do question below?

Writa an application of clinic to keep track of patient records.Create at least 30 record(with date,patient name,IC number,address,illness,doctor and charge in a text file.The application should read the patient records from text file and insert them into list by using array.After built, there is structure like... (a) List – Display the list of all records. The display should contain an appropriate heading and column captions; (b) Search by date – Search for all the transactions done on that date and print them out together with the total revenue of that day; (Refer to example below) (c) Search by one keyword – Search the records using a keyword and print out all the records which match the searched keyword. You have to tell no records found if none of them matches the keyword; (Refer to example below) (d) Search by two keywords – Search for the records using two different keywords and print out all the records which match both of the searched keywords at the same time. You have to tell no records found if none of them matches the keywords; (Refer to example below) (e) Search by gender – Search and display all male or female patients’ records depending on user’s selection; (f) Update – Ask user for a date and an I/C number. If any record matches the two entries, user will be asked to key in the new data for address, illness, doctor and charge. Then the list will be updated accordingly; (g) Add – Add a new record to the list; (h) Exit – Stop the program. Once the exit option is chosen, the application will update the text file accordingly with all the changes which have been done.

4th Aug 2016, 5:03 AM
Edison Ho
Edison Ho - avatar
4 Answers
+ 3
you have 5 exp and 1 badge. I don't think even the "experts" here would want to do your homework for you.
4th Aug 2016, 6:40 AM
TylerFrost
TylerFrost - avatar
0
Please show your progress. We'll help in taking you further from the points where you're stuck. Post your code which you've created so far.
4th Aug 2016, 7:10 AM
Nick D.
Nick D. - avatar
0
I assume you're creating separate arrays for each details. You can traverse the gender array and whenever you find male/female, you print the details from the other arrays at the same index where you found male/female in gender array. Correct me if I misinterpreted. There are better ways to do this with classes, structures and associative arrays, but since I believe you've to do this with simple array, that approach should work.
4th Aug 2016, 8:34 AM
Nick D.
Nick D. - avatar
- 1
No this is not homework.Its just a practical work.The coding still on the way.Array I think no problem.The problem is how to create coding for search by gender,name,date and etc.... My lecturer havent teach me yet so I need some guidance here.
4th Aug 2016, 7:33 AM
Edison Ho
Edison Ho - avatar