CSc 11: Introduction to Computing
Assignment #3 (Chapters 3 and 4)

While going through the multimedia for chapter 3 (A Taste of C++), you started creating simple C++ programs, using LOOKOUT (accessible via the C++ button on interface of The Universal Machine or by entering LOOKOUT in the Windows Run box or from MS-DOS on any PC connected to a Lehigh LAN). Once you've gone through the multimedia, use the lab time to finish up your Knobby's World homework assignment (given last week), then begin your C++ programming assignment, below. You'll also do the multimedia for chapter 4 (Programming Languages and their Translators) and work some more on the homework assignment below.

Laboratory work:
While during the multimedia, you will be asked to create a program that says Hello (your name), displays your name over several lines, and converts from kilograms to pounds. You should try to implement during the lab. Before you leave, show your work to the teaching assistant, then take the quiz on the multimedia material.

Homework exercises: The multimedia also asks you to choose between two possible problems: either an interstellar geometry problem or a radicals problem. Implement one of these problems as your first homework problem. In the textbook, The Universal Machine, do the following exercises: 2.69, 2.73 (after studying chapter 4 in the book and multimedia), 3.2, 3.5, 3.9, 3.15 (what error message does the gcc compiler (F5) give for this expression?), 3.16(a,b,e), 3.20(b,d--hint see section 3.3.3), 3.24 (see ASCII table, correcting Figure 3.16; see book's errata page for other corrections), 3.30, 3.32, 3.50, 4.2, 4.4 and 4.29.

Extra credit: 3.39, 3.42, 3.43 and/or 4.18.

Due: Tuesday, 9/26, anytime before midnight.

Hand in: When you're ready to submit your assignment, combine the answers to all the exercises (including source code for the programming exercises. Then, using a web browser, go to The Student Drop Box for Introduction to Computing. (It's under Student Tools.) Click on the Browse button, then find your files in their folder (if you put it on a floppy disk, it's in A:). When you've selected your file, you should see a directory path to this file next to the Browse button. If it looks right to you, click on the Send File to Instructor button. Then you should see this file listed under Current Files in your DropBox. The Teaching Assistant, Jeffrey Eynon, will get this file and grade it.

Hints:

Page 79, in the sample program, line 6 is the following:
    cin << pounds; //input from the keyboard
It should be:
    cin >> pounds; //input from the keyboard
This has been noted in errata for The Universal Machine. Please feel free to let me know about other errata.

You do NOT need to write a program for any of the exercises EXCEPT those in the PROGRAMMING EXERCISES section. E.g., 3.20 is just a paper exercise. Write the equivalent C++ code.

Prof. Blank