CPP PROG N600

Click here to skip to main content.
Distance Learning Design Banner

Cpp Programming N600
Foundations of C++

Course Introduction

About C++

 Required Text
  • Prata, Stephen. C++ Primer Plus, 5th ed. Sam's Publishing, 2004.
    ISBN: 0672326973
Recommended Textbooks
The following books are good C++ references. Material has been taken from each for this course.
  • Deitel & Deitel; C++ How to Program, 5th ed., 2005. This book has a good index, and covers C++ topics comprehensively. It is a good second text for beginner's syntax questions.
    ISBN: 0131857576

  • Eckel, Bruce. Thinking in C++, Vol. 1, 2nd ed, 2000. ISBN: 0139798099.

  • Lippman, Stanley; C++ Primer, 4th ed., 2005.
    ISBN: 0201721481 

  • Stroustrup, Bjarne; The C++ Programming Language, 3rd. ed., 1997.
    ISBN: 0201889544

C++ is a powerful programming language with potential for use in a tremendously diverse range of applications. Distinguished by its flexibility, C++ is the language of large applications such as Word and Excel, and is also is a language widely used in chips for heart monitors, automobile ignition systems, air conditioners, and a host of other embedded applications.

In the past, every new program had to be written from the ground up. Code that was written for one product could not be used for another product, even though the products might have overlapping functions. C++ makes it possible for previously written code, as well as previously written program designs, to be reused in a variety of applications. Code that produces a dialog box on screen for one software application, for example, can be used in another application for the same function. If necessary, C++ can also extend the dialog box's capabilities to address unique features of an application. The C++ library stores thousands of chunks of code that can be imported and modified in new applications, saving hours of programming time, and millions of dollars in expense. For these reasons, C++ is rapidly becoming the world-wide language of choice for serious designers and developers of both application and embedded programs.

to top

Scope of the Course

Foundations of C++ is designed to teach the non-object-oriented portion of the C++ language. It is a hands-on class in which you will learn how to write C++ programs with multiple source files. Throughout the course, you will be encouraged to develop and practice good software design methodologies.

In this course, you will begin by studying simple C++ programs that use only one source file, and then progress to the study of keyboard input and screen output. Subsequent topics include the concept of function, multiple functions, intrinsic data types, user-defined types, arrays, strings, memory management, pointers, dynamic and static memory allocation, loops and relational expressions, branching statements; and logical operators. After mastering these topics, you will learn how to write functions of reasonable complexity, with multiple arguments in separate source files that you will then compile and link into a single program.

to top

Course Objectives

After mastering the material in this class, you will have a working knowledge of the non-object-oriented portion of C++, and will be able to design, write, and debug a robust multiple file program. When you successfully complete this course, you will have the knowledge and skills required for enrollment in the University of Washington C++ certificate program.

to top Prerequisites

Course Preview
  • 11 Lessons
  • 10 Assignments
  • 1 Final Exam

To enroll in this course, you must have

  • a high school education or GED;
  • PC or Mac literacy (e.g., use of e-mail and directories and understanding of operating systems);
  • one to two years of recent (1998) programming experience in a high-level language(e.g., FORTRAN, BASIC, Pascal, COBOL, Smalltalk, Ada, or C);
  • solid knowledge of basic data structures (arrays, link lists, pointers); and
  • familiarity with DOS, OS/2, Windows, Linux, or Unix.
to top

About the Online Environment

Your online course offers several advantages to the traditional classroom, including the comprehensive Online Student Handbook, the ability to communicate electronically with students and with your instructor, and links to a rich array of online resources.

Student Handbook

Access detailed information about your online course.

Online Student Handbook

This handbook answers questions about your online learning course, such as how to purchase your text, schedule an exam, obtain a transcript, and get technical help if you need it. The handbook also provides additional resources, such as how to order books or journals from the library and how to study for an online course.

Communication with Your Instructor and Student Peers

Discussion Forums

Please read these "netiquette" guidelines for participating in online discussions.

  • Online Discussion Forums, designed by the University of Washington award winning Catalyst team, allow you to communicate with other currently enrolled students and with your instructor. We encourage you to use the discussion forum to exchange ideas, resources, and comments about your course work with other registered students in this course. This unstructured forum is monitored by your instructor.
  • You can also use e-mail to ask me a question. In fact, I encourage you to send personal course-related questions to me any time.

Online Resources

As an online student, you have access to a wealth of Web resources compiled to provide fast, easy access to information that supports your online learning experience. Organized by subjects, Online Resources link you to sites with help for writing and research, study skills, language learning, and library reference materials. All links have been assessed for credibility and reliability, and they are regularly monitored to ensure their usability.

to top

Course Requirements

Technology Requirements and Skills

In addition to the technology requirements and skills noted in the Online Student Handbook, for this course you will need access to a C++ compiler.

to top

C++ Compilers

Recommended C++ Compilers

A list of recommended compilers available for Windows and most other popular operating systems include those on the attached Recommended C++ Compiler list. If you choose not to purchase compiler software, you can buy compiler time in the U.W. computer labs.

Required Text

I chose C++ Primer Plus by Stephen Prata because of its friendly approach, clear language, excellent examples, and thorough presentation of C++, from the ground up. This book is designed for readers who do not have a background in C, but will also be helpful for students who are experienced C programmers.

The author introduces each C++ language feature, then provides concrete examples of how the feature is used. Plentiful illustrations in each chapter further understanding of the concepts presented. Students can get practice with C++ features by working through the examples and exercises in each chapter. The current edition includes coverage of the C++ Standard Template Library that C++ programmers must master to be competitive in the C++ market.

Multiple-Edition Reading Mapping

Since C++ Primer Plus is considered a classic by many in the field, I've attached a Multiple-Edition Reading Mapping for the 3rd and 4th editions of the text as well.

to top

About the Course

The material in Foundations of C++ is divided into ten lessons. Each lesson consists of an overview, required and recommended readings, learning objectives, key terms, practice exercises, a commentary written by the course developer/instructor, and an assignment. Required readings may consist of portions of several chapters from the text. The commentary includes programming examples. Although you will not have access to the course materials after your complete this course (or after your registration expires), you can use your Web browser to download or print the lessons for future reference. The lessons and text are the only materials required for this course.

To succeed in this course, you'll need to budget your time. Set the date you want to take the final exam, and then work backwards from there, setting due dates for each of the 10 assignments. Filling out (and printing a copy) of the Assignment Due Dates schedule on the Course Syllabus will help you keep track of your progress.

Key Terms

Key Terms

You will find key terms and abbreviations in sidebars in some lessons.

Where appropriate the lessons include terminology important to the concepts you learn in the lesson to serve as guides to your study. These terms are in a distinctive typeface where they appear in the text and are also shown in a sidebar box. The terms are defined in the lesson commentary, the assigned readings, or both.

Practice Exercises

Practice Exercises

You do not need to submit practice exercises.

Some lessons include practice exercises that provide opportunities for you to review, practice, and apply your learning. While these exercises are not submitted to the instructor and evaluated, you need to complete them to master the subject. You can contact the instructor for help with them if needed.

Lesson Overviews

Lesson Outline

Detailed list of topics lesson by lesson.

The following lesson overviews provide a glimpse into the many topics we'll cover in this course. For a detailed list of topics covered in each lesson, see the attached lesson outline.

Lesson One: Introduction: A Simple C++ Program

In this lesson, you will be introduced to the some of the concepts and terminology used in the writing of C++ programs, explore the elements of a C++ program, and study the mechanics of creating a C++ program. You will then apply your learning by writing and executing some simple C++ programs.

Lesson Two: C++ Building Blocks

In this lesson, you will be introduced to the basic building blocks of a C++ program. You will learn how to use functions, explore the kinds of data that are part of the C++ language, and learn to use the arithmetic operators on different kinds of data. You will also learn to write functions that use input data and return computed results that may be be used as input data in other functions.

Lesson Three: Strings, Arrays and Structures

In this lesson, you will complete your study of the arithmetic operators introduced in Lesson Two. You will learn how to convert variables of one type into another type, and discover how large amounts of information are stored and manipulated by a program. You will study the array, a group of variables of the same type; and strings, the method by which textual data is handled. You will learn to create and modify arrays and strings. Finally, you will be introduced to the struct and the union, ways to group several different types of variables together, which enables you to define your own data type.

Lesson Four: Using Pointers and Managing Memory

In this lesson you will be introduced to enumerations and pointers. Using your knowledge of pointers, you will learn how to allocate memory within your programs while they are executing. You will create variables and arrays dynamically using the C++ new and delete operators. The lesson will conclude with a discussion of storage classes.

Lesson Five: Loops and Relational Expressions

In this lesson, you will be introduced to loops and relational expressions. Loops enable you to perform the same statement repeatedly. Relational expressions enable you to compare variables, two strings, or any C++ statements that return a value. You will learn how to use a loop with cin() to obtain multiple characters from the keyboard. To aid you in controlling your loops, you will be shown the increment and decrement operators and the combination assignment operators. Finally, you will be introduced to the two-dimensional array. Using your knowledge of pointers and loops, you will learn how to iterate through an array and retrieve or set the value of any element within it.

Lesson Six: Branching

Branching statements are used with loops, arrays, and relational expressions throughout our programs to introduce logic into a function. In this lesson, you will be introduced to various branching keywords. In this lesson, you will also explore the cctype header file, which contains many pre-written library functions used to make branching decisions. Finally, you will explore the use of loops and branching logic.

Lesson Seven: Functions: C++'s Programming Modules

Until now, with the exception of the main() function, you have been using library functions rather than writing your own. In this lesson, you will learn how to write your own functions-how to declare and define a function, how to pass variables to a function as arguments, how to prototype a function, and how to call a function. The lesson concludes with an introduction to functions with multiple arguments.

Lesson Eight: Functions Part II

This lesson continues the study of functions. It focuses on the use of arrays and pointers as function arguments. In this lesson, you will learn how to modify a variable passed to a function by address, and how to prevent change to such a variable.

Lesson Nine: Functions Part III

In this lesson, we continue our study of functions with a focus on techniques for using functions. You will learn recursion, which is the process of a function calling itself, and also learn how to declare and use pointers to functions. Finally, you will explore references, which are a way to avoid the temporary copies of arguments
made by the compiler.

Lesson Ten: Storage classes, Scope and Linkage

In this lesson, the focus is on the structure of a C++ program involving multiple implementation files in which variables are shared among the files. You will learn how to compile separate files and link them up to create the executable—the program.

to top

About the Assignments and Exams

This course includes ten assignments that test your knowledge of the lesson material. This is where taking the time to complete the practice exercises will pay off. You will submit your completed assignment deliverables to your instructor. Detailed submission guidelines are on the "Assignment Submission Guidelines" page listed in the Course Syllabus.

Asking for Help

Please refer to the attached file for guidelines you need to follow when asking for help on a specific programming problem.

Important!

Be sure to read the information about scheduling a proctor for your final exam in the Student Handbook.

Software development is known to be iterative and incremental. For this reason—and to promote a more conducive learning environment—you may re-submit deliverables until they reach a level of satisfactory completion.

When you have completed all of the assignments, contact UWEO to schedule your proctored final examination. You have four months from the time of registration to complete the course. Be sure to read the information about scheduling a proctor for your final exam in the Student Handbook.

to top

Grading, Feedback, and Evaluation

Evaluation Criteria

For evaluation criteria of Programming Style, Programming Correctness, and Testing, see the Evaluation Criteria.

There will be no grades for assignments outside of satisfactory completion (SC) and unsatisfactory completion (USC). The instructor's feedback will always provide more useful and more extensive information than a number or letter grade, so you will always receive feedback—not just a grade of SC or USC—on your deliverables.

Note that going "above and beyond" in one deliverable does not make up for an unsatisfactory completion on another. To complete the course, you must complete all deliverables satisfactorily.

The instructor will provide you with written feedback on each of your assignments within one week of your submission. In addition, on request, the instructor will provide you with a summary of your progress in the course—which assignments you have turned in, and which are satisfactory.

A completed assignment consists of a code listing, a printout of the output, and annotated test cases of your code and their results Assignments are evaluated based upon clarity and consistency of style (30 percent), the correctness of the solution (40 percent), and demonstrated testing of the solution (30 percent).

For evaluation criteria of Programming Style, Programming Correctness, and Testing, see the Evaluation Criteria.

to top

About the Course Developer: Richard Buchmiller

Before he started his computing career, Richard Buchmiller was solving aerodynamic equations by hand and drawing graphs of the solutions on pieces of paper for $1.95 an hour. At one point, the company purchased an actual computer, which filled an entire room and had 16K of memory. Richard's job title was changed to Engineering Assistant. He programmed the computer in binary, and thus began his 40-year career as a programmer.

Over the years, Richard has have worked in FORTRAN, COBOL, and a language called DATABUS that doesn't exist anymore. Ten years ago, he earned C and C++ certificates, which enabled him to embark on a new and highly successful career as a C++ programmer.

Richard now works exclusively as a C++ programmer and teaches C++ with the hope that his students will have the same wonderful experiences he has have had with this language. Richard states: "In the software universe I have learned that knowledge is power and that C++ is at the center of that universe. C++ was the key that allowed me to learn other technologies like MFC, COM, ActiveX, ATL, and COM+."

to top