Homework 8:

Short Description:

This assignment is worth 10 points.

Goals

When you finish this homework, you should

Formal Description

Write two programs.
  1. Write a program that reads in an integer, converts that integer to a value between 0 and 19 using mod functions, and returns the string associated with the given integer. This program should be called EightBall. The answer it returns should correspond with those listed on this page.

    For Example

    % EightBall
    0
    It is certain.
    % EightBall
    19
    Very doubtful.
    % EightBall
    20
    It is certain.
        
  2. Write a second program called EightBallInterface. This program should

Notes

You must use pipe(), fork(), exec*() in this program.

Submission

Submit all programs in a tar file to your instructor as an attachment to an email message by the due date.