Programming Assignment #6 CS-2301 D-term Programming Assignment #6 Binary Trees CS-2301 System Programming D-term 2009 (Slides include materials from The C Programming Language, 2 nd edition, by Kernighan and Ritchie and from C: How to Program, 5 th and 6 th editions, by Deitel and Deitel)
Programming Assignment #6 CS-2301 D-term Assignment Read in a series of text files Keep track of the number of occurrences of each word In the set of files you read Print out a list of words (in alphabetical order) and the number of times each occurs Due Date:– Friday, May 1, :59 PM
Programming Assignment #6 CS-2301 D-term Goals and Objectives Pull together a non-trivial program from resources and algorithms at your disposal Build up and use a massive data structure in the form of a binary tree One entry for each separate word encountered Each entry counts the number of instances of that word Create and write your output file
Programming Assignment #6 CS-2301 D-term By the End of this Assignment… … you should feel confident that –You can write a non-trivial C program for any course assignment at WPI –You are capable of learning the things you don’t know on your own –You are beginning to think “computationally” with respect to collecting and organizing data
Programming Assignment #6 CS-2301 D-term What is a Binary Tree? Previous lecture topic See also §6.5 of Kernighan & Ritchie
Programming Assignment #6 CS-2301 D-term Your Program Multiple files as in Programming Assignment #5 Of your own organization makefile to build it or Visual Studio Algorithms from K & R or any other resources Cite your resources! Even Wikipedia!Even your friends!
Programming Assignment #6 CS-2301 D-term Command Line of Your Program./PA6 outputFilePath inputFilePath1 inputFilePath2...
Programming Assignment #6 CS-2301 D-term Sample Output (written to outputFilePath ) 166a 25and 11as 3command 15each 2file 4files 109in 4input 98it 99of 3open 6program 18read 152the 41this 3under 30would Total number of different words
Programming Assignment #6 CS-2301 D-term makefile or Visual Studio For building your program Note:– we don’t know what the file names of your program components are Only you (and your makefile ) know what needs to be built and how If you are feeling adventurous Build and debug in Visual Studio instead Use Visual Studio project files Clean your project before submitting Zip your files together for submission You will need to learn how to provide command line arguments to your program!
Programming Assignment #6 CS-2301 D-term Write-up Description of your program, the.c files,.h files, etc. Description of your data structure and the principal functions Citation of resources and algorithms
Programming Assignment #6 CS-2301 D-term Submitting Your Project Use /cs/bin/turnin submit cs2301 PA5... Submit:– Write-up.c files,.h files, and makefile or Clean, zipped version of Visual Studio project directory Sample output
Programming Assignment #6 CS-2301 D-term Questions?