Assignment 7

Read chapter 18 of the textbook and be able to answer the self-test questions at the end of the chapter.

  1. Answer the non-programming exercises at the end of Das chapter 18.

  2. Do the following Self-Test. What was your score? Molay, chapter 8 Self-test.

  3. Download ch18.zip with the examples from chapter 18 of Das. Write a Makefile to compile all of the programs. Demonstrate the use of signal.c, signal2.c, and killprocess.c following the example of the textbook.

  4. Write a signal handler that catches the SIGINT (CTRL-C) and SIGUSR1 signals.   The parent process (your program) should never exit on CTRL-C.  You may want to look at the BLP alarm.c.  The following requirements apply:

  5. Modify the program forkdemo2.c from Molay, chapter 8 so that it also prints out the parent process ID for each forked process. Use that information to build a tree showing the operation of the program.

  6. Do exercises 8.6, 8.8 and 8.9 from Molay.

  7. Write a Qt program to show the predefined colors. Model your output after the following example.

  8. Write Qt programs to show the brush and pen styles. Model your output after the following examples.

      

    or

      

  9. Write a Qt program to illustrate endcaps and joins. Here are some examples to get you started.

      

    and

  10. Write Qt programs to show the following geometric shapes, each in a 300 x 200 window.


Maintained by John Loomis, last updated 25 October 2006