CS0004: Programming Project 4

Assigned:March 26, 2007
Final Project Due:
 April 4, 2007
Solution:solution

Overview

In this assignment, you will be reading a series of strings from two files then outputing the strings that exist in one list but not in the other and vice versa. The idea is that this program will tell you wants different between the two lists.

You should write a function that takes two lists (lets call them A and B) then outputs the items in A that are not in B. The function declaration should look like this:: Function itemDiff(ByVal A() As String, ByVal B() As String) As String ' This function returns the items that appear in list A ' but not in list B YOU NEED TO WRITE THE REST! End Function

If no differences are detected then you should return a string array with one element whose value is the string "No Differences".

HINT: You might find it useful to write a find/search function that is similar to that found in project 3.

You can find code that will get you started on this project here (starter_code)

You can find the starter project here (starter_project).

Example Files

The files that must be read by your program is assumed to have a single number on each line. You can create your own files but I will provide you with two example files (same as those used in project 3) that will allow you to test your program.

numbers_1 can be downloaded and used a test file.

numbers_2 can be downloaded and used a test file.

Items in numbers_1 not in numbers_2 are:

  • 50
  • 34

Items in numbers_2 not in numbers_1 are:

  • 50.23
  • 34.32
  • 54.3
  • 234.234
  • 50.23
  • 43.2
  • 342.02
  • 6653.23
  • 53.23
  • 60.65
  • 90.12
  • 55.32
  • 100
  • 100.100
  • 9302.23

Remember this also works for lists of strings. Provided here are two example files with strings.

strings_1 can be downloaded and used a test file.

strings_2 can be downloaded and used a test file.

Items in strings_1 not in strings_2 are:

  • Visual
  • Edit
  • Basic
  • Coffee Cup
  • Pens
  • Cell Phone
  • Power

Items in strings_2 not in strings_1 are:

  • Standard
  • C++
  • Tea Cup
  • Pencils
  • Desk Phone

The Interface

images/interface_pa4.gif

The interface should allow the user to provide the program with two file paths then allow them to hit the load button. This should produce those items that are in file A and not in file B, and those in file B not in file A.

Grading

The grading sheet for this assignment is posted. The entire project is worth 100 points. Various items will be graded including functionality, design, proper use of form elements, code style, documentation, etc. Please note that documentation is graded, you must document your code!

Submission

Again, there are two parts to turn in for the final project. First, you need to bring a printout of the code window to class on April 4. Second, create a zipped folder containing the entire project. Name this file Lastname_Firstname_Assignmentnumber.zip. Example: Mills_Bryan_4.zip

Don't use spaces in your filename thats just bad, not cool, and always wrong.

You then need to upload this zip file to the following location, http://www.cs.pitt.edu/~bmills/upload/ . This web page will allow you to upload your zip file only once. If you need to upload your file again add a revision number to the end of the file (ie Mills_Bryan_4_2.zip, Mills_Bryan_4_3.zip). I will grade the file with highest revision number.

Let me know if you have any problems uploading files by emailing me. I will not accept submissions turned in late some don't even try it, I have millions of little monkeys in the computer watching for late submissions.

Extra Credit

I will offer a 10 point extra credit opportunity. If you have an idea for extra credit, email me or stop by during office hours and we can discuss it. Extra credit is added based upon the level and scope of the extra credit attempted. NO EXTRA CREDIT WILL BE AWARDED FOR ADDITIONS NOT DISCUSSED AND APPROVED!