CS 222: Computer Programming for Engineers

George Mason University
Spring 2013
3 Credits

Last Updated: Thu May 23 20:45:25 EDT 2013

1 Basic Course Information

Prerequisites
C or better in CS 112.
Course Meeting Time and Location
LectureT/R 4:30 - 7:10 pm
WebGMU Blackboard: http://mymason.gmu.edu

In addition to attending the regular meeting times, you are strongly encouraged to visit the professor and teaching assistant(s) during office hours to further your understanding of the material: we are here to help you learn.

Lecturer
NameChris Kauffman
Office HoursT 3:15-4:15pm
R 7:15-8:15pm
OfficeEngineering 5341
Emailkauffman@cs.gmu.edu
Phone703-993-5194
Text
Hanley and Koffman, Problem Solving and Program Design in C, 7th Edition.

2 Course Description and Goals

Modern engineering is almost always done using computers either as an aid or a primary modeling tool. To that end, it is essential for engineers to have a cursory understanding of how to exploit computation to meet their objectives. This course will discuss fundamental aspects of programming in the C language. The C language is designed to be close to the hardware on which it runs giving a programmer full control over the machine. This is in contrast to higher level languages such as Python and Java which insulate the programmer from hardware. Programs in C have very direct access to the underlying architecture of the execution device making C ideal for applications in which careful control of the device is required. This is particularly relevant for engineers working with computing hardware or other electronics.

Students in the course are assumed to have prior programming experience (see prerequisites) so that basic programming concepts such as variables, loops, conditionals, functions, and aggregate data are familiar. We will cover how these elements are expressed in C and how they are assembled to construct programs. We will also cover the set of tools which support C programs including compilers, preprocessors, standard libraries, and potentially debuggers. Near the end of the course, we will spend a short amount of time discussing the C++ language which extends C to include some high-level programming constructs.

3 Learning Outcomes

By the end of the semester, a passing student will be able to carry out the following types of activities:

  • Be able to implement, test and debug a designed solution to a problem in a ``low-level'' programming language, specifically the C programming language
  • Demonstrate a good understanding of C language constructs such as pointers, dynamic memory management, and address arithmetic
  • Demonstrate a good understanding of C libraries for input and output, and the interface between C programs and the UNIX operating system.
  • Demonstrate an ability to use UNIX tools for program development and debugging
  • Understand and be able to implement dynamic data structures
  • Understand basic object-oriented principles as enabled by C++

4 Coursework

4.1 Lectures

Each lecture will be divided in half: 1 hour and 15 minutes of lecture and discussion followed by a 15 break and then another 1 hour and 15 minutes of lecture. We will discuss programming concepts and I will provide demos of programming relevant to assignments. In addition to attending the regular meeting times, you are strongly encouraged to visit the professor and teaching assistant(s) during office hours to further your understanding of the material: we are here to help you learn.

Attendance of lectures is expected but not mandatory. Lectures are meant to assist students in learning the material and meet expectations on homework and exams. However, no formal attendance will be kept. When attending lecture and discussion, students are expected to arrive on time, avoid disruptions to presentations and discussion, and be respectful to the instructor and fellow learners. During lecture, new material will be introduced and discussed. Also, example problems will be solved which have the same character as those on homework. Participating in lectures are also the source of bonus credit. If you experience difficulty in lecture either understanding or with the conduct of other students, see the instructor during office hours or make an appointment.

4.2 Reading

Readings from the textbook relevant to each lecture are listed in the schedule. You will increase your understanding of lectures by reading associated textbook sections ahead of time, though this is not assumed. I may provide additional reading material to supplement the textbook which will be posted on the course web page.

4.3 Homework: Programming Assignments

Students will receive a number of programming assignments during the semester. Each assignment will involve writing programs and answering questions about them to illustrate an understanding of course material. The programming assignments will be electronically submitted to Blackboard on dates specified in the assignment by 11:59 p.m. Students may submit assignments as many times as needed up to the deadline.

4.4 Exams

There will be a series of hour-exams during the semester and a mandatory final exam.

On exam days, lecture will begin with a new topic, proceed to a brief review. After a short break, the exam will be administered.

All exams will be open book, open notes, open computing devices but no network access will be allowed. Exam questions will be designed such that learning a concept on the fly will take too long. Do not let the availability of resources fool you into preparing for exams inadequately.

5 Grading and Evaluation

Performance will be evaluated using programming assignments, hour exams, and the final exam. Grading of assignments will be done by the graduate teaching assistant. Grading of exams will be done by the lecturer. Failure to complete an assignment or take an exam will result only in loss of credit for that element of the course. Six assignments will be given but the lowest score will be dropped.

5.1 Grading Disputes

Grading disputes on assignments should first be addressed to the teaching assistant either in person or via e-mail. Only if you are unable to resolve the issue, then bring it to the instructor. Grading disputes on exams may be taken up with the instructor.

If you have not raised a dispute within 1 week of receiving a grade, the chance to contest it has closed.

5.2 Final Grades

Computation of the final grade will be done according the following weights on graded materials.

ComponentUnit WeightTotal Weight
5 Programming Assignments (drop lowest of 6)10%50%
2 In Class Exams15%30%
1 Comprehensive Final Exam20%20%

Grades for each assignment and exam will be input into Blackboard and may be viewed by students as the course progresses.

Final grades will be assigned without rounding according to the following criteria.

PercentGradePercentGrade
>=98A+89-78C+
97-92A77-72C
91-90A-71-70C-
89-88B+69-60D
87-82B<60F
81-80B-

5.3 Bonus Credit

Bonus credit will be awarded based on participation in class discussions in lecture. Each course meeting will be divided into two halves. Before each half, I will announce a range of the alphabet. Students with last names in that range may elect to sit in the first 2 rows of the class and answer questions. Reasonable effort on answering questions in class will garner class participation credit. Participation points may also earned for involvement in the class discussion board such as giving suggestions to students with questions (but not revealing answers wholesale). The highest point winner at the end of the semester will receive a 3% bonus to their overall score in the course. All other students will receive a bonus proportional to the highest point winner. For example, someone tied with the highest point scorer will also receive a 3% bonus while someone with half the participation points will receive a 1.5% bonus.

5.4 Homework

Homework is due via electronic submission by 11:59 p.m. on the dates specified. It is at the sole discretion of the instructor whether to accept late homeworks. Health or family emergencies are usually legitimate reasons for lateness but forgetfulness and procrastination are not. Notify the instructor via e-mail (preferred) or phone if you know you will miss a HW. In the case of an emergency, notify the instructor as soon as possible.

Reductions in credit may be given in any case for late homework at the discretion of the instructor. Typically this will be on the order of 10% reduction in credit per day late.

5.5 Missed Exams

Missing an exam results in a zero score and make-up exams will be considered only in situations involving death and near death.

Students are required to take the final exam though performance on it impacts the overall grade only according to the below table. The final exam is scheduled for 7/25/2013 during the usual lecture meeting. The same criteria for missing exams will be applied for a making up a missed final. The final exam will consist of a comprehensive set of questions covering all material covered in the course. Problems will be similar to those encountered on homework and exams.

6 Programming Policies

Since this is a programming course, some special policies will be in effect.

  • Programming projects will be submitted to Blackboard at the specified dates. You may submit assignments to Blackboard as many times as you like: only the most recent submission will be graded (up to the deadline).
  • Back up your program regularly. This is usually as simple as making a copy of the project folder. Submitting occasional early versions to Blackboard is also extremely helpful. Should last-minute problems happen such as accidental deletion, you will at least have some of your work to show. No code to submit means no credit.
  • Submitted code that does not compile will receive little to no credit.
  • When test cases are provided by the instructor use them and make sure your code passes all tests.
  • Familiarize yourself with how plagiarism works with programming in the next section of the syllabus.
  • Keep an untouched copy of your final code submission. It is important that you not touch your programs once you have made your final submission. If there are any submission problems, consideration for credit will only be given if it can be verified that the programs were not changed after being submitted.
  • You may develop programs using any computer system available. However, submitted projects must run under the gcc compiler available on either Zeus or Mason. No extensions will be given due to compiler incompatibilities.

7 Academic Honesty and Collaboration

PRIME DIRECTIVE: Be able to explain your own work including homework code and exam solutions.

Nearly all cheating in programming can be averted by adhering to the PRIME DIRECTIVE. Students may be asked at any time to explain code or exam solutions they submit. Inability to do so will be construed as evidence of misconduct. More specific guidelines are given below.

7.1 Thou Shalt Not

For the purposes of this course, the following actions constitute scholastic misconduct (cheating):

  • Directly copying someone else's solution to a homework problem, including student solutions from a previous semester
  • Directly copying an answer from some outside source such as the Internet or friend for a homework problem
  • Making use of an Instructor Solution manual to complete homework problems
  • Paying someone for a homework solution
  • Posting solutions to our discussion board or any other web site
  • Collaborating or copying someone else's answer during an exam
  • Aiding or abetting any of the above
  • Witnessing any of the above and failing to report it the instructor immediately

Refer to the following links for additional information.

7.2 Penalties

Any instance of misconduct that is detected will be referred to the honor board and will likely result in failing the course. Be advised that the teaching team will be employing electronic means to detect plagiarism. This is extremely easy with computer code so keep your nose clean.

7.3 Fair Collaboration

The purpose of this course is to learn about programming and learning from one another is a great help. To that end, the following actions will NOT be considered cheating in this course.

  • Talking to other students in the course about HW problems and informally describing how a problem may be solved.
    • Be very careful as you do this that you do not share any sort of code as this will be detected.
  • Getting or giving help fixing a small bug or two: a second set of eyes is a great boon to finding that misplaced semicolon that is preventing your code from compiling.
  • Searching the Internet for alternative presentations of a programming concept.
  • When unsure whether collaboration is fair or not, stop the activity until it can be cleared with instructor.

At all times keep the PRIME DIRECTIVE in mind when studying with another student. The above collaborations should be limited to getting someone over a hurdle, not carrying them across the finish line.

About half your grade will depend on programming projects. Doing them individually prepares you for the exams in which no collaboration of any kind is allowed.

8 Additional Policies

Students are expected to maintain a high level of civility for all participants in and out of class meetings. This includes respecting the beliefs of participants of all genders, ethnicities, and social backgrounds. Harassment of any type will not be tolerated and failure to behave in a respectful manner will result in referrals to University Counseling or the Office of Student Judicial Affairs. Any instances of sexual harassment will be reported to the Office of Equal Opportunity according the following policy: http://universitypolicy.gmu.edu/1202gen.html

Observance of religious events will be accommodated for students of any faith.

All possible accommodations will be made for students with disabilities. Please contact Disability Services (http://ods.gmu.edu/) and the instructor for further information.

9 Guidelines for Success

  • Most homework problems have analogs that are (1) discussed in lecture or (2) described in an example problem in the textbook. This should encourage you to
    • Attend lecture and take notes
    • Read the content of each section of the textbook carefully
    • Analyze the example code distributed by the instructor
  • Seek help from the instructor or teaching assistant when a concept is unclear. If you blow a problem on a HW or exam and don't see why, attend office hours to ask about it. We are here to aid your learning process.
  • Form good habits early on. This is a summer class so we will go at twice the speed of a regular semester. To help you absorb that much information, it will be very useful to read some of the material ahead of time. Things will move fast so don't fall behind.
  • C Programming has been around for a long time and there is a wealth of information on it online. Don't be afraid to consult online tutorials if a particular aspect of C programming is troublesome for you. However, do not misuse to the Internet to obtain solutions that you don't understand. Follow the PRIME DIRECTIVE at all times.
  • In addition to online resources, a number of alternative textbooks will be placed on reserve in the library.

10 Schedule of Events

This is an approximate schedule that may be adjusted as we go forward. Check Blackboard for the most up-to-date version.

SessionDateTopic/DeliverableReading/Topic
1-16/04 TIntro, Programming EnvironmentsPg 206, Setup Tutorial
Logistics, C OverviewSyllabus, Sec 1.3-1.5
1-26/06 RVariables, Operators, Calling functionsCh. 2
Preprocessor basics, I/O Library, Math Library
Programming Assignment 1 DueEdit/Compile/Variables/I/O
2-16/11 TFunctionsCh. 3
Conditionals: if, else, switchCh. 4
2-26/13 RIteration: while, for, doCh. 5
Aggregate data: Array and structCh. 7
Programming Assignment 2 DueConditionals/Iteration/Arrays
3-16/18 TPointers, dereference, addressesCh. 6, 13.1-13.2
Strings, String Library, More StructsCh. 8, Ch. 10.1-10.5
3-26/20 RDynamic allocation, mallocAppendix A, Lecture notes
Exam 1Ch. 2-5, 7
Programming Assignment 3 DueAggregates/Pointers
4-16/25 TMore Dynamic AllocationAppendix A, Lecture notes
File I/O, text and binary filesCh. 11
4-26/27 RLibraries, compiler, preprocessorCh. 12
Basic Data Structures, Linked ListSec 13.3-13.7
Programming Assignment 4 DueDynamic Allocation
5-17/02 TStandard and Common LibrariesAppendix B-1
Linked List libraryLecture Notes
7/04 RIndependence Day, No Class
6-17/09 TStacks and Queue Library
Recursive FunctionsCh. 9, Lecture Notes
6-27/11 RLess common operators, unionCh. 11.6, Appendix C
Exam 2Ch. 6, 8, 10.1-5, 13.1-2
Programming Assignment 5 DueFile I/O, Linked Lists
7-17/16 TBinary TreesCh. 13.8
Recursion and Data
7-27/18 RBuild system makeLecture Notes and
Memory Checker valgrind, Debugger gdbOnline tutorials
Programming Assignment 6 DueRecursion, Data Structures
8-17/24 TC++: extensions to and differences from CCh 15 (online)
Review
8-27/25 RFinal ExamComprehensive

Date: 2013-06-04 19:24:14 EDT

Author: Chris Kauffman

Org version 7.8.02 with Emacs version 24

Validate XHTML 1.0