CS 105 (C++)

Assignment 2: Seven-Segment Display





I. Overview


In this assignment, you will be working with a simulated seven-segment display.

A seven-segment display is composed of seven elements which can be individually switched on or off to produce representations of numbers or other symbols.  According to Wikipedia, these segments are named as shown below.



You will be creating two executables (called "a2a" and "a2b") which will be used in combination with an executable (called "a2c") which you will compile from a source file which I provide, to transform a single input digit character into its representation on a simulated seven-segment display in the following manner.

Along with the UNIX command echo (which simply sends its argument to output), these three executables can be strung together in a pipeline (with the output of one being passed to the input of the next) using pipes ("|").  For example, to run the pipeline on the character '2', you could use the command

echo 2 | a2a | a2b | a2c

to produce the following output.

 @@@
    @
    @
 @@@
@   
@   
 @@@


II. Grading


III. The More You Know

The following are some additional items that may be very important for you to know about this assignment.



Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.