Question: Instructions Write a C++ program according to the following: 1. Create a struct for an Access Record that contains a username, a filename, and a

 Instructions Write a C++ program according to the following: 1. Create

Instructions Write a C++ program according to the following: 1. Create a struct for an Access Record that contains a username, a filename, and a long (e.g. very large integer) timestamp 2. Prompt the user for the name of a file 3. Read in a list of Access Records from the file and store it in an array of structs 4. Prompt the user for a start time and an end time for consideration. 5. Display a list of all files that were accessed during that period along with the users that accessed them. 6. For this assignment, you may assume that the information entered is all valid 7. For this assignment, you may assume that there will never be more than 500 lines in a file (so you can declare your array accordingly) 8. Don't forget to break your program into meaningful, cohesive functions! A few hints It is common to create a function, such as displayRecord, that would take a struct and display it in a proper format Don't forget to use setw0 (from the iomanip library) to help with your right alignment. - Get started early, there are a few tricky aspects to this assignment Sample Output The following is an example of output for this program: Enter the access record file: /home/cs 165new/ass1gn02?.txt Enter the start time: 1442000000 Enter the end time: 1442332025 The following records match your criteria: Timestamp File User 1442000124 1442001032 1442210121 1442300125 house.pdf users.txt accounts.mdb vacation.jpg jatkins kevin tomlinson kevin tomlinson smitty83 End of records The input file could look something like: students.txt pricem 1441912123 house.pdf jatkins 1442000124 users.txt kevin tomlinson 1442001032 accounts.mdb kevin tomlinson 1442210121 vacation.jpg smitty83 1442300125 calendar.cpp burtons 1442588012

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!