Write library in c which reads calendar files

Assignment Help C/C++ Programming
Reference no: EM131004245

Detailed Question:

This is a cumulative assignment where first we had to write library in C which reads calendar files and interpret the data.

Now we have to write GUI in python and implement already written C function in previous assignment into the python. I have attached first two

Assignment as well to explain what you have to do. The first two assignments were marked through auto grader.

I also want you to fix my A2 first with provided auto grader then implement A3 which is required for A3 since its built on A1 and A2.When an application wants to read an ICS file, it will open the file in the normal C way, resulting in a FILE* variable. At this point, your utility functions will take over and digest the file's contents. Once the file has been read in, the application should close it in the normal C way; your utilities won't close the file, since they didn't open it.

CAUTION: In the next assignment, the input file will be connected to the standard input stream (stdin). stdin works just like a text file for most purposes, so it should be transparent to your program whether it is a "real" disk file or not. However, stdin cannot be repositioned using fseek or rewind , so avoid developing any algorithms that rely on repositioning the input stream. They would work for this assignment, but you'll run into trouble on the next one and be forced to recode.

You must code and submit two source files with these exact names (case sensitive) and proper file headers:

calutil.h: the public interface to your utility package.
calutil.c: the private implementation of the utility functions
Applications will #include "calutil.h" in their main program. For your own test purposes, you will also want to code a main program in another .c file that calls your functions with a variety of test cases, but you won't submit that program. Do not put your main() function in calutil.c, or else the official test program will fail due to multiple definitions of main(); you will lose marks for that.

A basic calutil.h has been provided for you. You must customize the file header with your student name and number. You may add to it if necessary, but you must not change the given typdefs or function prototypes, or else your utilities will not compile with the official test program. Be careful about upper/lower case! In classic (confusing) C style, output pointer arguments seem to have extra stars, but these become "&" (address of) in actual use. The const keyword has been inserted both for documentation purposes and to help you avoid trying to assign variables that are read-only.

You are free to create additional "helper functions" in calutil.c, each with its proper function header, if you find some recurring processing steps that you would like to factor out into a single place. Do not put helper function prototypes in calutil.h, since they are internal to your implementation and not for public users of the utility package.

Your functions are supposed to be robust. They will be tested with various kinds of invalid data and must detect problems without crashing. However, be sure to follow the specifications re error returns. Functions designed for use as utilities must not print out their own error messages! You will be penalized if your calutil.c does this. Error or status messages should be printed by a higher-level module, not low-level utility modules. This is because utilities generally have no way to know how the calling application wants to handle errors, or how it plans to use the stdout and stderr streams.

HINT: You may find it helpful to implement and test the file I/O functions in a top-down fashion. That is, code readCalFile first, and also write stubs for the subfunctions it calls. readCalFile can then be used to drive test data into your other functions as you begin to code them. Bottom-up implementation is also a valid approach.

HINT: In order to tell whether readCalFile (and subfunctions) are working right, it will be extremely helpful to write a private utility like "printCalFile" that mechanically goes through the data structure and prints everything out compactly. This also has the benefit of testing out the navigation of all the pointers and array sizes, so they won't blow up unexpectedly later. Put that utility in your own test program .c file, not in calutil.h/c.

Each prototype is given with pre- and postcondtions. The preconditions should be assumed true by the function and not verified, unless the description calls for testing and provides for error-handling. If a caller violates an unverified precondition, the resulting behaviour is the calling function's fault.

NOTE: If for your own peace of mind during development you wish to verify preconditions beyond those required by the spec, use assert() for this purpose. Conversely, do not use assertions to check for errors that are required by the spec. The official test program will be compiled with assertions disabled, so that they do not interfere with the autotester's smooth operation.

Since ICS files are ASCII, you can open the sample files in a text editor and "damage" them, to try out your error detection code. Don't limit your testing to just whatever files have been supplied!

Attachment:- uploading.zip

Reference no: EM131004245

Questions Cloud

What is the equivalent amount now : The buyer can pay the total contract price of $2,100,000 two years from now (when the turbines will be needed) or an equivalent amount now. At an interest rate of 15% per year, what is the equivalent amount now?
What is the present worth of the assessment system : Military officials can then determine if an aircraft is fine, is in need of overhaul, or should be retired. If the 3-D system allows the Navy to use one airplane 2 years longer than it normally would have been used, thereby delaying the purchase o..
How much will recorders have to cost : A research team from the University of Nova Scotia needs 20 of the recorders, and they are trying to decide whether they should buy them now at $649 each or purchase them 2 years from now, which is when they will be deployed. At an intere..
Find the roots of the characteristic polynomial : Find the roots of the characteristic polynomial, r+ and r-, larger and smaller or equal, respectively. Find the real-valued fundamental solutions to the differential equation associated to the roots in part (a).
Write library in c which reads calendar files : Cumulative assignment where first we had to write library in C which reads calendar files and interpret the data.
Identify the engineering economy symbols involved : Identify the following as cash inflows or outflows to Anderson and Dyess Design-Build Engineers: office supplies, GPS surveying equipment, auctioning of used earth-moving equipment, staff salaries, fees for services rendered, interest from bank de..
Describe what could result when the following occur : The primary community resources that could be used to help these individuals, Be sure to identify specific, actual community resources.
Made out of profits and the amounts : The Titanic Partnership's loan from Big Bank is structured so that payments on the loan are made out of profits and the amounts of the payments vary according to profitability. What conclusions may one draw from this arrangement?
Find parametric equations for the given line : Find parametric equations for the line from the point P = (2, -3) to the point Q = (-4,12) along which a particle moves at a constant speed in 3 seconds.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Function that shifts the stored value of five character

Write a function that shifts the stored value of five character variables in a circular fashion. Your function should work in the following way. Suspose that C1, C2, C3, C4, C5 are variables of type char, and suspose that the values of these varia..

  Convert infix to postfix expression

For every postfix expression there exists a corresponding and uniquely defined infix expression that evaluates to the same number.

  Generate a multiplication table

Write a C program (a pseudo code) that will generate a 5 X 5 multiplication table starting with the number of the users choice.

  Implementing the tictac-toe game

A software company that develops games has just hired you! Before working on the next version of Medieval Menace they have given you the task of implementing the tictac-toe game in C++

  Read integers values one at a time from standard input

Write a C++ program to do the following. The program will read integers values one at a time from standard input (cin) until you read the value 150.

  Write a c program that uses functions to perform

Write a C program that uses functions to perform the following: i) Addition of Two Matrices ii) Multiplication of Two Matrices

  Computer programming using c language lab

Computer programming using c language lab

  Interpret the data and information gathered

To at least 10 people (learners and parents) to gather data, that could, through analysis provide answers Analyse and interpret the data and information gathered; Write a report based on your investigation; and Prepare a presentation to present the..

  Search the maximum number from a list of numbers

Write a function to search the maximum number from a list of numbers:

  Program that incorporates these two functions

Write the program that incorporates these two functions, as described. You will notice that the two functions have very similar statements, so you are doing some repetitive C++ code.

  Write a function sum3darray

Write a function sum3DArray. This function will take a three dimensional array of ints and add all the entries in the three dimensional array. Assume columns and rank are two constants already defined.

  Define a string of four characters and converts

Write an assembly program that defines a string of four characters and converts it into an unsigned 16-bit integer.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd