How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask ATLProg Your Own Question
ATLProg
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 9151
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
44910485
Type Your Homework Question Here...
ATLProg is online now
A new question is answered every 9 seconds

Program help

This answer was rated:

For ATLProg only

 


Create a simple electronic runner’s journal that allows a user to log a list of runs. Your program must use the “list” API in the C++ standard template library (STL). Your program must keep track of a list of attributes associated with each run in a global linked list data structure. The program must implement at least one class, which will hold the following class variables:

• An integer variable to hold an identification number associated with the log entry. This must be a randomly generated number that contains exactly eight digits. For example, 12896123. Duplicate entries are not allowed.

• A string variable to hold the date of the log entry. The entered date must be in the form mm/dd/yyyy. If the user enters an invalid date format, the program must print an error and reprompt the user to enter the date in the correct format.

• A string variable to hold the time of day of the log entry (i.e. the time that the run will start). The entered date must be in the form hh:mm am or hh:mm pm. Again, if the user enters an invalidtime format, the program must print an error and re-prompt the user to enter the time in the correct format.

• A string variable to hold the users goal.
• A string variable to hold the current weather (e.g. rainy, cloudy, sunny, hot, cold, etc.).
• A string variable to hold the name of the route.
• A double variable to hold the distance of the run (in miles)
• A string variable to hold the running time in the format hh:mm:ss.

Provide the appropriate accessor methods to set and get the data for each of these class variables. For example getRoute() and setRoute(string route). The main program must provide the following functionality:

1. When the program is first started, it must read a data file called log.dat. If the file exists, the program will load the data for each log entry into the global linked list data structure. If the file does not exist, the program will start with an empty linked list.

2. Provide a simple text-based user interface that displays the name of your runner’s log and allows the user to operate on the global linked list of log entries. Each log entry must be placed in this global linked list as an object that will hold all of the information associated with each run. The program interface will allow the user to do the following:

(a) Enter a run – allows the user to enter all of the fields for log entry associated for a given run, except for the identification field, which will be an automatically generated eight digit random number. After the data fields are entered, the program will place the log entry in the global linked list data structure.

(b) Search for a run – allows the user to search for a log entry in the linked list based on a given date. The program should prompt the user to enter a data in the form mm/dd/yyyy. Display a message if there are no entries not found in the linked list for a given date. If there are multiple entries for a given date, the program should display all of the entries associated with that date.

(c) Modify a run – allows the user to modify any of the fields for a log entry (except for the log identification number) in the linked list. Use the eight digit identification number as the key to find the entry to modify. Display a message if the log entry is not found in the linked list.

(d) Delete a run – allows the user to delete a log entry from the linked list using the eight digit identification number as the key. Display a message if the item is not found in the linked list.

(e) Display the log – displays all of the entries in the linked list. The feature will display all of the fields associated with the each log entry. It should also print the total number of miles for all of the entries in the linked list.

(f) Exit program – before the program exits, it must save all of the data for each log entry that is contained within the linked list into the log.dat data file. At this point, if the file does not exist, the program will create it.

Hi, I am a Moderator for this topic. I sent your requested professional a message to follow up with you here, when he is back online. If I can help further, please let me know. Thank you for your continued patience.
Customer: replied 4 years ago.
Thank you for your help.
Hi, Welcome to JustAnswer, It will be my pleasure to help you. Can you please let me know how soon you need this done.
Customer: replied 4 years ago.
This is due at midnight central standard time on May 15.
Ok will have it ready by then for you.
Customer: replied 4 years ago.
Thank you.
ok
Customer: replied 4 years ago.
Sorry to be a bother, but how is the progress?
How much more time do we have ?
Customer: replied 4 years ago.
It is due Wed.
ok..
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 9151
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
ATLProg and other Homework Specialists are ready to help you

Related Homework Questions