|
(due: Friday, 11/12)
This lab will allow the user to read and write files (file I/O), using a "Main Menu's File", Pull-Down Menu.
This lab is a work in progress. We will start with a simple editor and turn it into a word frequency counter.
I will help by providing the data and text files for the project...
Here is the text file for the very simple editor shown above. It demonstrates file I/O and the use of the "Main File Menu dialog", it is called "win_file_io1.txt" (uses listBox1) or "win_file_io.txt" (uses textBox1). 1. You need to create the window's project with a MenuStrip to create your "Open", "Save As" and "Exit" options. Get it from your toolbox and drop it on your project (you will need to double click on each of the pull-down elements to create the empty "toolStripMenuItem2_Click","toolStripMenuItem3_Click" and the "toolStripMenuItem4_Click" routines. Cut-and-paste in the code from the text file provided. 2. You will also need an "OpenFileDialog" and a "SaveFileDialog" element from your toolbox - drop these on your project window as you did with the StripMenu element. *** Don't forget textBox1_TextChanged() event routine... Double click on the textBox1 area to create the textBox1_TextChanged() event routine. Populate it with code you'll find in the search.txt file shown below: 3. This is what your new program should look like.
4. This is where I'll provide you will a data file of the "King James Bible", our chosen test data. "john.txt". 5. This is the source code, to use to complete your working project...
6. Do all this and you've got a "B", an "A" will take more
effort. What other features or extra buttons, display options can you add?
Remember, this is a programming methods class, neatness and form are important. Please turn in your assignment by using the Assignment Turn-in at tinyRealm.com BBS. Just post a "Reply" to the lab assignment message and upload your assignment (by "Attaching" a file to your reply message). You should attach your entire project zipped up in "zip" or "rar" format.
*** If you don't have winzip or winrar, get them at tinyRealm.com
They are available from the pull-down menu's (Useful downloads)(Archive...).
Naming convention: class_lab#_YourInitials.format mine would look like: cisc2330_l9_efa.zip
|