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

  C -programming in what ways are the

in what ways are the initializationrepetition testand update steps alike for a sentinel-controlled loop and an

  Stores a series of numbers in a binary tree.

Queue Converter, Write a program that stores a series of numbers in a binary tree. Then have the program insert the values into a queue in ascending order. Dequeue the values and display them on the screen to confirm that they were stored in the prop..

  Write a program that will read in 2 numbers per line

1.Write a program that will read in 2 numbers per line, and print the sum. You program should work for any number of lines of data.

  Virus protection program

If you encounter a Trojan Horse what has happened? You read a fake email from a bank that appears to be asking for personal information. Someone has stolen your credit card and used it to purchase items online.

  Write a program to simulate the process

Write a program to simulate the process of an n-bit (n x n) shift-and-add syn-chronous multiplier - Compare performance of an unsigned shift-and-add multiplier with one using a shift-over technique.

  Write a cpp program that creates a number of line objects

Write a C++ program that creates a number of Line objects and tests each pair for intersection. Your program should print an appropriate error message for parallel lines.

  How can virtual destructors plug a memory leak

What is a pure virtual member function? What is a memory leak? How can virtual destructors plug a memory leak?

  Use a define statement to create a constant

Follow these specifications: Use a define statement to create a constant that will hold your student number. You should have separate string variables for your first and last name; name these first_name and last_name.

  Accepts a pointer to a c-string as an argument

Write a function that accepts a pointer to a C-string as an argument and capitalizes the fist character of each sentence in the string. For instance, if the string argument is "hello

  Create a bar chart showing the average monthly mean temperat

Write a ++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013. The point of the exercise is to compute the sie and location of the rectangles rather than explicitely hardcode that informat..

  Derive class weekday from class datetime

We can retrieve any one of the date-time structure member using strftime - Derive class WeekDay from class DateTime such that WeekDay::display() will display local date time using values from the parameters and the corresponding weekday.

  Generate the initial deck of cards.

It may also enable the top card in the waste pile to be placed The adjustments are made until nothing can be moved. Play continues until all of the original cards in the deck are in play and all adjustments are made

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