Assignment 7
Home ] Up ] Assignment 1 ] Assignment 2 ] Assignment 3 ] Assignment 4 ] Assignment 5 ] Assignment 6 ] [ Assignment 7 ] Assignment 8 ]

 

Assignment 7a
Assignment 7b
Assignment 7c

 

A Shuttle

This assignment consists of three parts:

  1. A Shuttle Program
  2. A Shuttle Component
  3. A Virtual Supermarket

Please do the three parts in the order specified. You will find that the assignment builds on the previous section, so you should complete each part before moving on to the next part.

I want to see your results for each part separately, so I can see how you built things up.

Here's an important note about how to go about this:

(Much of the following probably won't make much sense until you've read the details in Part A.)

Take some time to think about what you’re writing.  If you find yourself writing code that looks very similar to code that you’ve already written, then what does that suggest you should do?  

Please do not say “Cut and paste!” !!!!

You will probably find a number of opportunities to fold otherwise repetitive code into a small number of common (most likely private) methods – with suitable method arguments.

For example, you can cause an entry in one list to move to the other list in two ways:

  1. You can select the item, and then click on the appropriate button, or:
  2. You can simply double-click on the item.

Do not write duplicated code for these two approaches!

Another observation:  The actions to move an item from the left list to the right list are identical to the actions necessary to move an item from the right list to the left list, except for which list is the source and which is the target.  Again, try to avoid writing duplicate code!

By the end of this course, I’d like to believe that you can all do appropriate factoring of functionality to come up with a reasonably optimal, minimally code-duplicated solution.  So here’s an opportunity to practice that!

 

This page was last modified on 02 October, 2007