CS 3304
Homework Assignment 4

Given: July 21, 1997 Due: July 29, 1997

The point value of each problem is shown in [ ]. The assignment must be received by the beginning of class on July 29, 1997. See syllabus for late policy.

When the problem asks for an explanation, give a clearly written justification of your answer.

[15] 1.

Chapter 9, Problem 5.



[15] 2.

Chapter 9, Problem 6.



[15] 3.

Chapter 10, Problem 12. To ensure some uniformity of solutions, use queue_elem as the type of an element of the queue and queue_size as the maximum number of elements that may be in the queue.



[15] 4.

Chapter 10, Problem 14. You are to define 6 operations on an abstract data type called complex. You may do this in C, if you prefer, with the following key type definition:

typedef struct {
    double re;	/* real part */
    double im;	/* imaginary part */
} COMPLEX;

As help in implementing division, note that if a + b i is a nonzero complex number, then its reciprocal is

eqnarray57

An attempt to divide by 0 should result in an exception being raised, say by a call to a procedure exception (which you can just assume exists).



About this document ...

This document was generated using the LaTeX2HTML translator Version 96.1 (Feb 5, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -split 0 -t CS 3304 Homework Assignment 4 homework4.

The translation was initiated by cs3304sm class account on Mon Jul 21 08:10:43 EDT 1997


cs3304sm class account
Mon Jul 21 08:10:43 EDT 1997