Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 assi t you may assume that there will never be more than 500 lines in a file (so you can declare your array 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/cs165new/assign02a,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 smittys3 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago