Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need this written in C language ( not c++ or c# ) and using command line arguments (argc argv). There is a test case attached

Need this written in C language ( not c++ or c# ) and using command line arguments (argc argv). There is a test case attached on pic 2 and here they are. The program has to use 3 other functions not including redableTime and main

1503489600 2055551234 13 Hello. This is your mother. Make sure to get to class early today. 1503489610 2055551234 8 And make sure you get a good breakfast. 1503489620 2055551234 11 Don't sit in the back. Talk to the people around you. 1503489630 2055551234 12 Please call your grandmother and tell her about your day later on. 1503489640 2055551234 33 And let me know about your classes. Do you like your teachers? Does this feel like the right major for you? Have you signed up for co-op yet? Don't stay up too late. 1503493200 2055551234 14 I hope you are not texting in class. Sit up front and take notes. 1503540010 2055551234 1 WHAT?

___________________________________________________________________________________________________________________________________________________

1503493190 2055551234 1 k 1503493210 2055551234 1 k 1503540000 2055551234 8 classes were fine, going out with friends now. 1503550740 2055551234 8 back home, met some new friends, had fun

image text in transcribedimage text in transcribed

CS 100 Project Four - Spring 2018 This program assumes that the text message logs maintained in your phone are stored in two separate files. The first file is all the incoming text messages that you received, the second is all the outgoing text messages that you sent. This program reads these two files and prints your text message history in chronological order (oldest to newest). The program takes two command-line arguments that represent the log files for all incoming text messages and all outgoing text messages. A sample execution is: ./a.out datafilel datafile2 Page two contains a sample execution of the program. The two log files capture a conversation from the first day of school last August with your mother. Look at the sample log files and the program execution before reading any further The format for these two log files is shown below: An EPOCH-time is an integer representing the number of seconds since January 1, 1970. 1519408800 translates to noon on Friday, February 23, 2018 (Central). To convert an EPOCH-time integer to a readable date, use the function shown below // this function takes an integer representing a time in seconds and // returns a formatted string (ending with a newline) containing the date char *readableTime (int sec) time t epoch time = (time t) sec ; return asctime ( localtime &epoch_time ) ); allows you to generate EPOCH-times for any date, and see the date The website associated with any EPOCH-time. nv Your program reads from two files and prints out the text message conversations in chronological order (from the oldest message sent/received to the newest). The required format for your output is . The first 25 characters on a line are a readable version of the EPOCH time. The function readableTime (shown above) has a newline character as the very last character of the string it generates. Make sure you remove this trailing newline character (simply replace it with a '\0' character) The next field in the output lines is the phone number that texted you (or you texted) The text message itself is printed in a block that does not exceed 40 characters. If there are more than 40 characters in a text message, wrap . * e message to the next line. The basic algorithm for merging two files into a single output is shown below. For this project, you can assume that no two text messages will ever have the same timestam Read timel from filel Read time2 from file2 While not end-of-file-for-filel AND not end-of-file-for-file2) If timel

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_2

Step: 3

blur-text-image_3

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

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

3. What advice might you have for Ralph?

Answered: 1 week ago

Question

Explain the various methods of job evaluation

Answered: 1 week ago

Question

Differentiate Personnel Management and Human Resource Management

Answered: 1 week ago

Question

Describe the functions of Human resource management

Answered: 1 week ago

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

Identify the four federally mandated employee benefits.

Answered: 1 week ago