Component connections.

From: R. Clayton <rclayton_at_monmouth.edu>
Date: Tue, 3 Apr 2007 09:52:43 -0400

  You specified that if we detect a not or switch gate with the wrong number of
  inputs that we should print an error and exit. What should we do if we find
  a gate with the wrong number of outputs such as a not gate with more than one
  output or any gate with no outputs? Should we print an error and exit, print
  a warning and move on, or just ignore it?

First, except for output ports, a circuit component can have any number of
output connections (oddly, output ports should have no output connections). A
not or switch component with more than one output connection is fine.

Second, it's up to you how components with no output connections are handled.
My solution ignores them, unless there's no path between any input and output
port, in which case it prints a "discontinuous circuit" error message and
exits.

  Also, there is no example program in the class directory, should there be?

There should be; I'm still working on it.
Received on Tue Apr 03 2007 - 09:53:21 EDT

This archive was generated by hypermail 2.2.0 : Tue Apr 03 2007 - 10:03:27 EDT