Programming Assignment Chapter 2 Solution

The following excerpts are used for educational purposes for sake of completeness of project from Programming and Problem Solving With C++ Sixth Edition by Nell Dale and Chip Weems, permission was not granted by the author(s) of this book. I am using the content under Fair Use along with this statement explaining why.


###Assignment_2A

Problem 1 excerpted from page 88:

Write a program that prints out your course schedule for a single week. Here's an example of the output for one day:

Monday 9:00 Computer Science 101
Monday 11:00 Physics 201
Monday 2:00 Dance 153

Use named string constants wherever possible to avoid retyping any words or numbers. Be sure to include appropriate comments in your code, choose meaningful indentifiers, and use indentation as we do with the programs in this chapter.


###Assignment_2B

Problem 4 excerpted from page 88:

Write a program that prints out business cards for yourself. A card should include your name, street address, phone number(s), and email address. You also can make up a company name and put that on the card if you wish. To save paper, the program should print eight cards per page, arranged in two colums of four cards. To reduce typing, you should declare a named string constant for each line of the card, and then write output statements to print the eight cards using those constants. Be sure to include appropriate comments in your code, choose meaningful identifiers, and use indentation as we do with the programs in this chapter.


Output will appear as:

Michael McQuade Michael McQuade
700 N Greenwood Ave, Tulsa, OK 74106 700 N Greenwood Ave, Tulsa, OK 74106
918-594-8000 918-594-8000
[email protected] [email protected]

Michael McQuade Michael McQuade
700 N Greenwood Ave, Tulsa, OK 74106 700 N Greenwood Ave, Tulsa, OK 74106
918-594-8000 918-594-8000
[email protected] [email protected]

Michael McQuade Michael McQuade
700 N Greenwood Ave, Tulsa, OK 74106 700 N Greenwood Ave, Tulsa, OK 74106
918-594-8000 918-594-8000
[email protected] [email protected]

Michael McQuade Michael McQuade
700 N Greenwood Ave, Tulsa, OK 74106 700 N Greenwood Ave, Tulsa, OK 74106
918-594-8000 918-594-8000
[email protected] [email protected]
Powered by