CPTR 124
Fundamentals of Programming Winter 2017

Home Code Exam 2 Study Guide Labs WebGrades


Rick Halterman

School of Computing
1117E Hickman Hall
Southern Adventist University
Collegedale, TN 37315-0370


Office Hours: http://computing.southern.edu/halterman/General/OfficeHours

Course Venue

HSC 1307    MWF 10:00–10:50 am
HSC 1303    W 1:00–3:30 pm


Halterman, Richard L. Fundamentals of C++ Programming. 2017.


Math ACT ≥ 22 or Math SAT ≥ 520 or MATH 116 College Algebra, or permission of instructor


Catalog description:

CPTR 124. Fundamentals of Programming (G-1) 4 hours
Prerequisite: Math ACT ≥ 22 or Math SAT ≥ 520 or MATH 116 or permission of instructor.
Control structures, data types, data representation, compiling, debugging, modularity, and standard programming algorithms are introduced, using an object oriented language. Three hours of lecture and three hours of laboratory each week.

This course has three objectives:

  1. to develop the ability to correctly analyze a variety of problems and generate appropriate algorithmic solutions
  2. to explore the syntax and usage of the C++ programming language as a means of accomplishing the first objective
  3. to examine the software development environment and associated tools.

Class Requirements and Grading

Class Work. The following class activities, weighted as indicated, determine the student's overall average for the course.

Activity Weight
Assignments 20%
Worksheets 20%
Quizzes 20%
Midterm Examination 20%
Final Examination 20%

Grade Distribution. The overall average determines the course grade according to the following table:

Overall Average
92 ≤ avg A
90 ≤ avg < 92   A–
88 ≤ avg < 90   B+
82 ≤ avg < 88 B
80 ≤ avg < 82   B–
78 ≤ avg < 80   C+
70 ≤ avg < 78 C
60 ≤ avg < 70   C–
58 ≤ avg < 60   D+
52 ≤ avg < 58 D
50 ≤ avg < 52  D–
avg < 50 F

CPTR 124 Fundamentals of Programming is a 4-hour course that includes an integrated laboratory component. As indicated above, the lab assignments contribute to the overall course grade.


Laboratories and assignments. Attendance at laboratory sessions is required as this is a four credit-hour course. All lab assignments are due at the designated time and date. Late assignments will be penalized.

Ethics. As described above, a student's overall course grade is based on several factors: worksheets, quizzes, examinations, and assignments. Each activity includes an expectation about a student's individual effort in the work produced. The following specifies the degree of collaboration permitted for each activity:

  • Worksheets and quizzes. Each student must work individually on individual worksheets and quizzes. This means collaboration in any way with others is not permitted. Some worksheets and quizzes may be team based, in which case collaboration is limited to teammates. The instructor will clearly identify the team-based worksheets and quizzes.

  • Examinations. All examinations must represent individual effort; collaboration in any way with others is not permitted during examinations.

  • Assignments. Programming assignments present opportunities for students to explore programming concepts in a structured way. Assignments constitute the fundamental learning experience for this course. Ideally each student will develop his/her own logic and implement an assignment's solution with no help from others; however, such an experience is rare for most students. Since the programming assignments are meant to be learning experiences, most students will be uncomfortable with their ability to complete an assignment at the start. This is due to their lack of experience with the concepts the assignment addresses. The process of completing the assignment is intended to provide the necessary experience and build confidence. Students learn differently, and some need more help than others. The laboratory setting provides immediate help from the instructor and lab assistant. Tutors, classmates, friends, and the web can provide additional help outside of lab.

    It is important to understand that the experience gained from doing the assignments forms the basis for programming problems on examinations. The wrong kind of help can dilute the learning goals of the assignments and leave students less prepared for the examinations. The best kind of assistance includes pointing out simple corrections or providing hints about how to structure a solution. Explaining to a classmate how a particular C++ language feature works independent of its use within his/her program always is valuable. Helping a fellow student extinguish a puzzling error message also always is a good thing to do.

    Much less valuable help includes “I do not know what you are doing, but here, look at my code, this is how I did it.” Even worse is this: “I’ll email you my code so you can see how I did it.” Providing clues or hints to nudge a student in the right direction is much more beneficial to learning. Unfortunately, when presented with a complete solution, many students will take the easy way out and not put in the time necessary to understand completely how the code they were given works. This means they will complete the assignment but lack the full effect the process was meant to provide. A student that receives credit for an assignment should understand completely all the concepts involved in the assignment's solution.

    It obviously is bad if you submit someone else’s work as your own, but, as is common in academic settings, knowingly enabling the opportunity for someone else to copy your work also is bad.

    Please take care as you are providing help to others. It IS okay to help others, and you SHOULD help others as you can, but giving others your code or doing their work for them is not really the help they need.

    It is very important to note that this course policy on collaboration in programming assignments is not the norm in other courses offered by this department or university. Speaking freely with others about your assignments in another course very likely will be considered an act of academic dishonesty. If you are unclear about what is acceptable collaboration in another course, you should ask the instructor.

All incidents of academic dishonesty will be reported to the Associate Vice-president of Academic Affairs.

Class study. Appropriate study for the course includes reading the textbook (at least as far as last class's lecture material), experimenting with the programs from the book and programs we develop in class, and working through the exercises at the end of each chapter.

Weekly quizzes encourage students to remain current in their class preparation. Quiz contents are based on material covered in the preceding classes. Usually quizzes will be distributed at the beginning of the class period. Missed quizzes may not be made up; however, the lowest quiz score will be dropped during the last week of the semester.

Class periods that do not offer a quiz may include a worksheet to be completed during the class period by the student. Careful attention in class facilitates the completion of the worksheet. Missed worksheets may not be made up; however, the lowest two worksheet scores will be dropped during the last week of the semester.

Class decorum. Please comply with the standards of classroom attire as specified in the Student Handbook.  Notebook computers are welcome, and the classroom and lab (generally) have an excellent wireless signal.  Those with computers should mute the volume and sit in the rear of the class so as not to distract students behind them.  Electronic devices must be turned off during quizzes and tests.  You are expected to remain in the classroom during quizzes and tests, so be sure to take care of affairs (such as bathroom visits and tissue acquisition) before you sit for the quiz or test.

Examinations The dates for each test is listed in this syllabus. In certain situations, due to unavoidable circumstances, a missed test may be made up. Arrangements for the retake should be made before the time of the originally scheduled test. The make-up test may vary greatly in form from the original test, but its content (topics addressed) will be the same. Because of this difference, any points added (the so called "curve") to tests taken during the regularly scheduled time may not apply to retakes.

Please note the date and time for our final exam listed below. You need to plan to take your final exam at the scheduled time. Please make your work and vacation plans accordingly. Academic Administration will grant approval for variance from the published exam schedule only in cases of verified, serious, illness or a death in the immediate family. Academic Administration may, in case of exceptional and unavoidable circumstances, approve a variance, in consultation with the professor of this course. A $65 processing fee may be assessed.

Extra credit. Since the assigned material and activities are sufficient for most students, no extra credit will be available for additional work. However, well-prepared students wishing to enhance their learning experience beyond the class activities will be directed, upon request, to additional resources. Any such additional work will not influence the grade for this class.  

SAU account.  All students must have an active Southern Adventist University email account. This account is necessary to receive class messages and to be able to use the computers in the programming lab.

It is important that you check your southern.edu email account frequently (at least daily, if possible) so you you do not miss potentially important information about this course. Please use use your southern.edu email account when contacting the instructor; if you use a non-Southern account, your message may not make it through the University's spam filter.

Disability Statement. In keeping with the University’s policy, if you are a student who believes you may need an accommodation based on the impact of a disability or learning challenge, (i.e. physical, learning, psychological, ADHD or other type), you are strongly encouraged to contact Disability Support Services (DSS) at 423-236-2544 or stop by Lynn Wood Hall, Room 1082. Please note that accommodations are not retroactive and cannot be implemented until faculty or staff members have received the official Letter of Accommodation from DSS. Specific details of disabilities remain confidential between students and DSS unless a student chooses to disclose or there is legitimate academic need for disclosure, which is on a case-by-case basis. For further details, visit the Disability Support Services website at http://www.southern.edu/disabilitysupport.


Chapter Topics
1 Context of software development; Tools: preprocessor, compiler, linker, debugger, profiler
2 Creating C++ programs with Visual Studio 2015; Program structure: #includes, using statement, main function
3 Values, variables, identifiers, assignment, reserved words, console input and output; Types: integer types (int, long, unsigned, etc.), floating point types (float, double), characters.
4 Arithmetic: arithmetic operators, expressions, bitwise operators, mixed-type expressions, type conversions, operator precedence and associativity, comments, source code formatting, compile-time errors, run-time errors, logic errors, warnings, definition of algorithm
5 Conditional execution: Boolean expressions, relational operators, Boolean expressions, if statement, compound Boolean expressions, if/else, multi-way if/else statements, nested conditionals, conditional expressions, typical errors in conditional statements
6 Iteration: while loops, nested loops, abnormal termination (with break, continue, and goto), infinite loops, iteration examples
7 switch statement, do/while loops, for loops
8 Using functions: parameter passing, function prototypes, standard mathematics functions, system time, character routines, pseudorandom numbers
9 Writing functions: defining functions, calling functions, formal vs. actual parameters, pass by value, example functions
9 Tracing program execution with a debugger
10 More on functions: global variables, persistent local variables, overloaded functions, recursion, multifile programs, pointers, pass by reference (pointers vs. reference parameters)
11 Sequence data types—std::vectors and arrays: declaring, using, passing to functions, array notation vs. pointer notation, static vs. dynamic arrays, memory management problems, multidimensional vectors and arrays, C strings
12 Vector/array algorithms: sorting, linear search, binary search, permutations
13 Standard C++ classes, std::string objects, file streams
14 Programmer-defined types: Classes, data members, member functions (methods), public vs. private members, constructors, destructors
15 Fine tuning objects: this, const methods, overloading operators, static members
16 Sample custom types
17 Brief overview of inheritance and polymorphism, protected members, overriding methods
18 Generic programming: function templates, class templates
19 Standard template library
20 Smart pointers
21 Associative containers: tuples, maps, unordered maps
22 Handling exceptions

Items in gray may be considered in less depth than other topics and only as time allows.

Important Dates

  • Monday, January 9: first day of class for CPTR 318
  • Monday, January 16: no class (MLK Jr./Community Service Day)
  • Wednesday, February 22: Midterm exam
  • Friday, March 3–Friday, March 10: no classes (midterm break)
  • Thursday, March 23: Last day to drop a class
  • Tuesday, May 2 at 10:00 am: Final examination Note day and time!

Class Code

Code we develop in class is available at https://github.com/halterman/124_W17