CDA4101, Assignment 3
Due 10/28 at the start of class
Write a Java program for problem 43 in the Chapter 3 exercises. Make the
following adjustments
-
You may work in teams of two for this project. If you decide to do this,
please notify me via e-mail of who the team members are.
-
This is a perfect example for using OO design.
-
All pins look the same. They can be set, and they contain a list of
other pins that they are connected to.
-
All gates have an output pin and at least one input pin.
All gates could be derived from such a class. All two-input gates
could be derived from a class that has an additional input pin. There
could be a heirarchy of gates: Gate - Two Input Gate - Three Input Gate -
etc.
-
You need three types of gates for this assignment: input,
output, nand.
-
Read the number of rows, columns, input and output from the wire specification
file.
-
Create a GUI interface. Use a Canvas to draw the truth table for the
circuit. Use a Choice to list all the files in the default directory.
Do not hard code the name of the directory.
-
Create wire spcifications for the following:
-
NAND gate
-
AND gate
-
OR gate
-
Majority function
-
The PLA question from HW1.
-
Create a package named GateArray. Place all your .java and
.wspc files in this package. Upload a zip archive of the complete
package.
-
Create JavaDoc documentation for your project. In the documentation, indicate
who was the author of each method that you create.
-
Each method cannot exceed 25 lines of code. The only exception is the
paint method.
Course Objectives met by this Homework
3. Master the design of memory, ALU, control unit, and design of microprogram