CenTable Requirements Specification CenTable is a system fo

CenTable - Requirements Specification CenTable is a system for creating tabular reports from county-level U.S.Census Data it is appropriate for batch processing (both off Ine and in support of an on-line system). The inputs to the system are the ASCII county data fle (land associated data dictionary) and an ASCI tle that describes the tabular report to be created. The output is a table in either HTMI or AScll text format 1. Command-Line Parameters 1.1. The first command line parameter must be the mame of the county level data file to use. 1.2 The second parameter must be either-h (to indicate that the output should be in HTMor (to indicate that the output should be in ASCl et) Location of \"Files\" .1. All census data fles must be in the same directory as the executable 2.2 The report desoription fle must be read from standard in. 2· 3 Report Description File 1. The format of the report deicription file has not been specified 32. Contents of the Report Description File 3.2.1it must include a list of all of the counbies to include in the report 22.It musz contain the field identifiers for the columns so inclade in the report [in ender. 3.23Jt mast contain #tte for each field in the report. 3.2.3.1 It must contain a format descriptor for the title that idudt the horizonal positioning of the titie (left, center, or right) and the appropriane way to handle ttles that are too long truncate, break word boundareia 324Jt must contain a format descrigtor for each field in the report that includes the width of the field, the number of digts to the right of the decimal place (for floating-point fields the padding character to use, and an indication of whether or not the sign should always 12 5Jt must contain a specifier for each field Chatt indicates what information (total, mean nothingl should be diplayed in the last now of the output 1 42 Output must When the containing the required information 42.1. The tedt must be displayed in a xed-width font 4.22. The output need not handle page breaks ie, the repert can have an arbitrary mumber of be sent to standard out witch is used, the output must be an appropriately formatted HTML table rows when the fiag t.ned, the output munt be an approprately formatted ASCII tnt file ethat wil look coreect when displayed in a feed with fo 4.3.1 The output need not handle page breaks e, the report can have an arbibrary number of rows. S1 The report desoription fle may be generated by an untrusted source. 52 Command-line parameters may be provided by an untrusted source 5.3. CenTable must only be able to read 0m the dinectory is installed in and standard in, Centable must only be able to write to standa out.

Solution

Okay So basically what you have to create a C Program for an application. This should be called CenTable.

Input:

1. This system will take as input a text file which contains information about countries and their census. It must be containing a lot of fields. You need to once take a look at the file to understand what format it is in and create your program accordingly.

2. The next input is a commnd line argument which would be given while running the program. This would be the name of the new file your program will create as an output.

3. Another input will be again a command line argument that is either -h or -t where -h indicates that your program will generate a HTML file and -t indicates that your program generates a text file.

Processing:

What you have to do is,

1. Read the input file. Have different array variables that will strore different fields provided in the file in the same order.

2. Have two functions - one for HTML file creation and one for text file creation.

3. In HTML file creation function, have your standard out to first add the header, body and table heading tags. Then have a loop to add each and every row of the table with data. Also provide the attributes for table (aligment). Dont forget to name this file with the extension .html

4. In text file creation function, use standard output to do the same job as above but the spacing and formatting must be hardcoded. i.e you have to provide dashes(-) to provide table borders. Name this file with .txt extension.

Output:

Either a html file or a txt file that will contain tables regarding census information for all the countries.

 CenTable - Requirements Specification CenTable is a system for creating tabular reports from county-level U.S.Census Data it is appropriate for batch processin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site