Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Edit: You can use whatever variables you want, I will change them to my language later. But if you mean those screenshots i posted i

Edit: You can use whatever variables you want, I will change them to my language later. But if you mean those screenshots i posted i have explained the meaning below the photos. But the text file we read shows data in this order: The date and time the assignment was returned;The assignment name;The assignments ID number;Users ID number. And the program should read this file and then return how many of each assignment was returned. I've explained everything below better, but thats the idea of the program. Comment if you still have a question. Edit: What does "file system" comment mean? Make a C-language program that reads a text file and creates it from the data in the lines linked list, analyze the data and then write the results to the screen as well as to a file. The starting point is a log file taken from Moodle with the tasks of the programming course return dates for which you need to find out basic information such as the return quantities for different tasks. Make a program compile the course according to the instructions in the Makefile and restore it to Viope after you restore files with Moodle. Be sure to put header information in each file you restore. 2. Program Requirements The program should have a main menu with the following items: 1) Read the file 2) Analyze the data 3) Print the results 0) Stop The following functions are related to these functions: 1. Read the file. The program asks the user for the name of the file to be read, reads the file and always forms one node from the data in one row in the linked list. The node record contains one return time, date and time, task as a string and identification number of the name and the identification number of the returner. The return time should be stored in the node as a time record (struct tm), the name of the task as a string, task and user ID numbers as integers. File after reading, the program reports the number of records read as well as the first and dates of last return. 2. Analyze the data. The program goes through the linked list and calculates the different tasks refund amounts. There are 60 different tasks, so you can make a table of these tasks and use the task identifier as the starting point for the index in the table. It is a good idea to put records in the table that always have single-task returns the number and name of the task as a string. You may want to format the records number 0 and the task name Blank. 3. Print the results. The program asks the user if this wants the results to be displayed or in a file, and in the case of a file, the name of the file to be saved. This Assignment Baseline.docx then a table is printed / saved with the name of each task followed by it return amount separated by a semicolon. 4. Finish. The program clears the list and stops running the program.
Other requirements related to the operation of the program: 1. Create a subroutine to ask the user for the file name and use it for both read and write to ask for the name of the file you want to write. 2. Divide the program into three code files and the corresponding header files. Wing main program and menu subroutine to main program.c file, file processing related subroutines to the ali1.c file and other subroutines to the ali2.c file. Each C file is paired with a header file with the same name. 3. The program should always close the files after the file processing is completed. 4. When writing a file, any previous file will be destroyed when opened. 5. When reading the data in a file from the list, the list must be cleared before adding the data. 6. In the analysis and recording subroutines, be the first to check that there is data and in the list if not, notify the user and return to the calling program.

How the file looks like :

image text in transcribed

Palautusaika = The date and time the assignment was returned

TehtavaNimi = The assignment name

TehtavaID = The assignments ID number

KauttajaID = Users ID number

The program should return

image text in transcribed

Tehtava = Assignment

Lkm = How many were returned

6. Error messages Not all program error messages appear in the example run, so they are grouped below. Use them according to need.  "Unknown selection, please try again."  "Memory allocation failed"  "Failed to read file"  "Failed to write to file"  "Not to analyze, read the recovery file first."  "Not printable, first analyze the recovery file."
Palautusaika; TehtavaNimi; TehtavaID; KayttajaID 8/09/20, 10:46; L0111;1;6607164 8/09/20, 10:47;L0173;3;6607164 8/09/20, 10:47;L0174;4;6607164 8/09/20, 10:47; L0112;2;6607164 8/09/20, 10:48;L0175;5;6607164 8/09/20, 17:50;L0111;1;3209775 Tehtv; Lkm L01T1; 211 L0112;206 L0173; 206 L0114; 206 L0175;205 L82T1;280 LO2T2; 198 Palautusaika; TehtavaNimi; TehtavaID; KayttajaID 8/09/20, 10:46; L0111;1;6607164 8/09/20, 10:47;L0173;3;6607164 8/09/20, 10:47;L0174;4;6607164 8/09/20, 10:47; L0112;2;6607164 8/09/20, 10:48;L0175;5;6607164 8/09/20, 17:50;L0111;1;3209775 Tehtv; Lkm L01T1; 211 L0112;206 L0173; 206 L0114; 206 L0175;205 L82T1;280 LO2T2; 198

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

Does your message use dishonest or misleading language?

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago