Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is my question Sir/Ma'am. I need a c program and here is my input text. Name,Email,Join Time,Leave Time,Duration(Minutes) Ece Nur Yilmaz,ecenur.yilmaz@gidatarim.edu.tr,13/01/2022 10:00:37,13/01/2022 11:30:43,90.0 Ali

Here is my question Sir/Ma'am. I need a c program and here is my input text.

Name,Email,Join Time,Leave Time,Duration(Minutes) Ece Nur Yilmaz,ecenur.yilmaz@gidatarim.edu.tr,13/01/2022 10:00:37,13/01/2022 11:30:43,90.0 Ali Toprak,ali.toprak@gidatarim.edu.tr,13/01/2022 10:30:22,13/01/2022 11:43:10,73.0 Beyza Agac,beyza.agac@gidatarim.edu.tr,13/01/2022 11:10:17,13/01/2022 11:59:13,49.0 Zeynep TUNA,zeynep.tuna@gidatarim.edu.tr,13/01/2022 10:03:37,13/01/2022 12:11:33,128.0 Omer Bal,omer.bal@gidatarim.edu.tr,13/01/2022 11:00:01,13/01/2022 13:10:43,130.0 Can Yaprak,can.yaprak@gidatarim.edu.tr,13/01/2022 10:53:37,13/01/2022 12:45:53,112.0 Ahmet Bugra Deniz,ahmetbugra.deniz@gidatarim.edu.tr,13/01/2022 9:47:37,13/01/2022 11:30:43,103.0 Ali Toprak,ali.toprak@gidatarim.edu.tr,13/01/2022 9:53:29,13/01/2022 10:13:53,20.0 Zeynep Tan,zeynep.tan@gidatarim.edu.tr,13/01/2022 10:15:17,13/01/2022 11:49:57,94.0 Emre Kara,,13/01/2022 9:43:01,13/01/2022 11:31:39,108.0 Ece Nur YILMAZ,ecenur.yilmaz@gidatarim.edu.tr,13/01/2022 10:03:25,13/01/2022 11:57:48,114.0 Seda Deniz,seda.deniz@gidatarim.edu.tr,13/01/2022 10:07:07,13/01/2022 10:53:44,46.0 Mustafa Ozlem,mustafa.ozlem@gidatarim.edu.tr,13/01/2022 9:51:37,13/01/2022 11:13:54,82.0 Mehmet Kale,mehmet.kale@gidatarim.edu.tr,13/01/2022 11:10:31,13/01/2022 13:01:48,111.0 Asya Eda Eski,asyaeda.eski@gidatarim.edu.tr,13/01/2022 10:00:11,13/01/2022 11:33:55,93.0 Mert Yagmur,mert.yagmur@gidatarim.edu.tr,13/01/2022 9:30:37,13/01/2022 11:17:43,107.0 Ayse Gunes,,13/01/2022 10:07:29,13/01/2022 11:10:36,63.0 Yagmur Ceyhun,yagmur.ceyhun@gidatarim.edu.tr,13/01/2022 9:54:01,13/01/2022 11:01:13,67.0 Zeynep Tuna,,13/01/2022 13:01:31,13/01/2022 13:03:53,2.0 image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

In this assignment, you are going to write a C program that reads, processes, and displays attendance records in a Zoom meeting report provided as a txt file. Getting to know input file: A sample Zoom meeting report (input.txt) is given as follows: Name, Email, Join Time, Leave Time, Duration(Minutes) Ece Nur Yilmaz, ecenur.yilmaz@gidatarim.edu.tr, 13/01/2022 10:00:37, 13/01/2022 11:30:43,90.0 Ali Toprak, ali toprak@gidatarim.edu.tr, 13/01/2022 10:30:22, 13/01/2022 11:43:10,73.0 Beyza Agac, beyza.agac@gidatarim.edu.tr, 13/01/2022 11:10:17, 13/01/2022 11:59:13,49.0 Zeynep TUNA, zeynep. tuna@gidatarim.edu.tr, 13/01/2022 10:03:37, 13/01/2022 12:11:33,128. Omer Bal, omer.bal@gidatarim.edu.tr, 13/01/2022 11:00:01, 13/01/2022 13:10:43,130. Can Yaprak,can.yaprak@gidatarim.edu.tr, 13/01/2022 10:53:37, 13/01/2022 12:45:53, 112.0 Ahmet Bugra Deniz, ahmetbugra.deniz@gidatarim.edu.tr, 13/01/2022 9:47:37, 13/01/2022 11:30:43, 103. Ali Toprak, ali toprak@gidatarim.edu.tr, 13/01/2022 9:53:29, 13/01/2022 10:13:53,20.0 Zeynep Tan, zeynep. tan@gidatarim.edu.tr, 13/01/2022 10:15:17,13/01/2022 11:49:57,94. Emre Kara, , 13/01/2022 9:43:01, 13/01/2022 11:31:39, 108. Ece Nur YILMAZ, ecenur.yilmaz@gidatarim.edu.tr, 13/01/2022 10:03:25, 13/01/2022 11:57:48,114.0 Seda Deniz, seda.deniz@gidatarim.edu.tr, 13/01/2022 10:07:07, 13/01/2022 10:53:44,46. Mustafa Ozlem, mustafa.ozlem@gidatarim.edu.tr, 13/01/2022 9:51:37, 13/01/2022 11:13:54,82.0 Mehmet Kale, mehmet. kale@gidatarim.edu.tr, 13/01/2022 11:10:31, 13/01/2022 13:01:48,111. Asya Eda Eski, asyaeda.eski@gidatarim.edu.tr, 13/01/2022 10:00:11, 13/01/2022 11:33:55,93. Mert Yagmur, mert. yagmur@gidatarim.edu.tr, 13/01/2022 9:30:37, 13/01/2022 11:17:43, 107.0 Ayse Gunes, , 13/01/2022 10:07:29, 13/01/2022 11:10:36,63.0 Yagmur Ceyhun, yagmur.ceyhun@gidatarim.edu.tr, 13/01/2022 9:54:01, 13/01/2022 11:01:13,67.0 Zeynep Tuna,, 13/01/2022 13:01:31, 13/01/2022 13:03:53,2.0 The first line of the input file is a header line which includes title of each column of the data file: Name: Name & surname Email: Email address Join Time: Date and time when participants join the meeting Leave Time: Date and time when participants leave the meeting Duration: Duration (in terms of minutes) passed between join and leave time Each of the remaining lines includes a record for a connection of an attendee to the meeting where attendees are uniquely recognized by their name & surname. Name of an attendee might include more than one word but surname is always a single word at the end of name & surname Name & surname refer to the same attendee if they are the same without considering uppercase/lowercase distinction of the letters. For example: Ece Nur Yilmaz and ECE NUR YILMAZ refer to the same attendee. Ece Nur Yilmaz and Ece Nur YILMAZ refer to the same attendee. Of course, order and number of the words in name & surname matters. For example: Ece Nur Yilmaz and Nur Ece Yilmaz refer to different attendees. ECE NUR YILMAZ and ECE YILMAZ refer to different attendees. Assume that there is a single space character between words in name & surname column of input file. For example: ECE NUR YILMAZ and ECENUR YILMAZ refer to different attendees. Of course, if there is a difference between surnames or names, they refer to different attendees. For example: ECENUR YILMAZ and ECE YILMAZ refer to different attendees. ECE YILMAZ and ECE YILMAZCAN refer to different attendees. Notice that it is possible that e-mail address is not provided in some records. Also, notice that there might be more than one record for some of attendees as they leave and join the meeting multiple times. Assume that there is no time overlap between multiple connections made by each attendee. That means each attendee has at most one connection at each moment of the meeting. Assume that duration is always provided for each record and it is compatible with the difference between join and leave time so you will consider duration of each connection as the number at the end of its corresponding line (you do not need to compute duration of each connection from join and leave time). Assume that the number of attendees in a Zoom session is not greater than 500. Ask the user : is minimum duration where we would like display attendees which attended the meeting at least this minimum duration. : When we enter the word "unsorted", then the output will be provided in the original order of the records in the input file. When we enter the word "sorted", the output will be in the alphabetical order based on surname & name combination (so the order will be based on surname and, if surnames are the same, the order will be based on name). What the program is expected to do: Your program is supposed to do the following tasks: Read input file so that, for each connection, store name & surname of the corresponding attendee along with duration of the connection. If there are multiple connections made by the same attendee: o Update duration of the first connection by adding durations of the remaining connections. o keep the first connection (whose duration is updated) and remove the remaining connections. Write surname, name of attendees along with duration of their total connection if their total connection is at least . o If is "unsorted", the order of attendees in the output file will be in their original order in the input file. o If is "sorted", the order of attendees in the output file will be based on alphabetical order of their surname & name. Sample Outputs: Sample output 1: The content of output1_0.txt is as follows (displayOption: unsorted, minDuration: 0): Yilmaz Ece Nur 204.00 Toprak Ali 93.00 Agac Beyza 49.00 TUNA Zeynep 130.00 Bal Omer 130.00 Yaprak Can 112.00 Deniz Ahmet Bugra 103.00 Tan Zeynep 94.00 Kara Emre 108.00 Deniz Seda 46.00 Ozlem Mustafa 82.00 Kale Mehmet 111.00 Eski Asya Eda 93.00 Yagmur Mert 107.00 Gunes Ayse 63.00 Ceyhun Yagmur 67.00 Sample output 2: The content of output1_0_sorted.txt is as follows (displayOption: sorted, minDuration: 0): Agac Beyza 49.00 Bal Omer 130.00 Ceyhun Yagmur 67.00 Deniz Ahmet Bugra 103.00 Deniz Seda 46.00 Eski Asya Eda 93.00 Gunes Ayse 63.00 Kale Mehmet 111.00 Kara Emre 108.00 Ozlem Mustafa 82.00 Tan Zeynep 94.00 Toprak Ali 93.00 TUNA Zeynep 130.00 Yagmur Mert 107.00 Yaprak Can 112.00 Yilmaz Ece Nur 204.00 Sample output 3: The content of output1_100.txt is as follows (displayOption: unsorted, minDuration: 100): Yilmaz Ece Nur 204.00 TUNA Zeynep 130.00 Bal Omer 130.00 Yaprak Can 112.00 Deniz Ahmet Bugra 103.00 Kara Emre 108.00 Kale Mehmet 111.00 Yagmur Mert 107.00 Sample output 4: The content of output1_100_sorted.txt is as follows (displayOption: sorted, minDuration: 100): Bal Omer 130.00 Deniz Ahmet Bugra 103.00 Kale Mehmet 111.00 Kara Emre 108.00 TUNA Zeynep 130.00 Yagmur Mert 107.00 Yaprak Can 112.00 Yilmaz Ece Nur 204.00 Hints In this homework, you are mainly expected to use your skills from Chapter 8 Characters & Strings and Chapter 11 File Processsing. Check out string.h library functions. Check also character functions available in ctype.h. You may also consider using fgets, fputs functions under stdio.h, if applicable to your solution

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions