CSCE 121H - Introduction to Program Design and Concepts

Fall 2019


Professor: Dr. Thomas R. Ioerger
email:ioerger@cs.tamu.edu
Office: 322C Bright Bldg.
office hours: Thurs, 10:30-11:30

Teaching Assistant: Siru Li
email address:li1994@tamu.edu
office location:501C HRBB
office hours:11:00-12:00 MWF

Peer Teachers:

Meeting: MWF, 8:00-10:00, ZACH 598 (lecture and lab combined)

Course Web Page: https://people.engr.tamu.edu/ioerger/cs121h-fall19/index.html (this page)

Course Description (from TAMU course catalog): Computation to enhance problem solving abilities; computational thinking; understanding how people communicate with computers, how computing affects society; design and implementation of algorithms; data types, program control, iteration, functions, classes, and exceptions; understanding abstraction, modularity, code reuse, debugging, maintenance, and other aspects of software development; development and execution of programs.

Prerequisites: Prior programming course (high school or college, any programming language).

Textbook: ZyBooks: CSCE 121: Introduction to Program Design & Concepts C++

Piazza: This term we will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TA, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com. Find our class page at: https://piazza.com/tamu/fall2019/csce121h/home

See bit.ly/linuxhomedoc for instructions on how to create your computer account on compute.cse.tamu.edu, which we will be using for compiling your programs.

Course Objectives: After completing this class, students will know how to:

  1. design a program that accomplishes a computational task
  2. implement that program in C++ code that compiles
  3. use basic software-engineering tools and methods
  4. demonstrate understanding of concepts such as object-oriented programming and execption handling, and when and how to use them
Topics Grading

The work for this course will primarily focus on a series of programming assignments.

There will be one mid-term exam and a final exam.

The overall score for the course will be a weighted combination of these components, which is tentatively set as follows:

The final grade will be determined from the weighted-average total as follows:

The penalty for late assignments is -5% per day (pro-rated over 24 hours).
After 10 days late, the deductions cease; the maximum loss of points is 50%. As long as you turn an assignment in by the end of the semester, it could still be worth as much as half-credit. This is to encourage you to eventually complete the assignment, even if you can't get it in on time initially.


Schedule:

assignmenttopicconceptsactivities in-class
Mon, Aug 26(first day of class)Introduction
Wed, Aug 28compilers vs interpreters; editing, compiling, makefiles; C vs C++hello.cpp
Fri, Aug 30Basic Data Typesint, ASCII chars, IEEE floats, char*, boolexamples.cpp
Mon, Sep 2expressions operator precedence, casting/coercionshowbits.cpp - print out int as bitstring
Wed, Sep 4Basic I/Oprintf, cout, getting input from user (gets, cin, getline), processing command-line argsarea.c, area2.cpp - read length and width interactively (user input) or from cmdline args; print product
Fri, Sep 6string functionsC vs C++stringtest1.c, stringtest2.cpp - implement interactive loop: get line from user, print it, print length, print capitalized, and search for 'i' or "is" (print position if found)
Mon, Sep 9Branches and Loopswhile, if, for, switch
Wed, Sep 11File I/Oifstreammean.cpp - of vals in a file; mygrep.cpp - print lines of file containing pattern;
wordcount.cpp - report num of chars, words, and lines in a file, like 'wc'
Fri, Sep 13source-code controlgit
Mon, Sep 16Functionsgcd.cpp - calculate GCD of 2 ints from cmd line;
quadratic.cpp - calculate roots of quadratic eqn given 3 coefficients input by user
Wed, Sep 18Recursionfact.cpp, fib.cpp, gcd_rec.cpp
Fri, Sep 20Project 1 duecompiling multiple source files and headersinterger_functions.cpp, integer_functions.hpp
Mon, Sep 23Arraysarray.cpp, geometry.cpp
Wed, Sep 25Pointerspointers.cpp
Fri, Sep 27Project 2 due
Mon, Sep 30Structs; time functionstime_t, struct tmiris.cpp - read in iris.data, store in vector of structs; print count of each species and mean of each attribute
Wed, Oct 2rand()Mersenne Twister, Linear Congruential Generatorspi.cpp - calc pi via a Monte Carlo method
randomize.cpp - read in lines from a file and print out in random order
Fri, Oct 4Project 3 due
Mon, Oct 7stringstreamsmysplit.cpp
Wed, Oct 9Project 4 duegenomicsgenomics.cpp
Fri, Oct 11sortingsortdata.cpp (wx.dat); degrees-that-pay-back.csv - use your split(line,',') function; skip first 2 rows; make a vector of structs; try sorting by starting salary, mid-career, percent-change, and 90th percentile
Mon, Oct 14Project 5 dueFactoring and Primesfactor.cpp
Wed, Oct 16Software Engineeringcoding style, computational thinking, UML, debugging, tools like gdb, testing
Fri, Oct 18Project 6 due
texas-cities.dat
map of Tx cities
Dynamic ProgrammingfibDP.cpp - put a wrapper around the recursive version of fib() that uses an array to make calculating fib(100) faster; use long long int
Mon, Oct 21mid-term exam
Wed, Oct 23Classescomplex.cpp
Fri, Oct 25
Mon, Oct 28myvec.cpp - write your own class to emulate vectors (of ints)
Wed, Oct 30Inheritanceshapes.cpp
Fri, Nov 1Project 7 duedownload Employee code from ZyBooks Sec. 10.6. Write a makefile to get it to compile. Extend it by adding a subclass for EmployeeExecutive with member title (e.g. CEO...), and declare Steve Jobs (CEO of Apple, salary $1) as an instance.
Mon, Nov 4Templates
Wed, Nov 6pairs, tuplesscores.cpp - practice with pairs and tuples
Fri, Nov 8Project 8 due
Mon, Nov 11Iteratorsiterators.cpp - see Activity on slides
Wed, Nov 13survey of STL Containerslists, vectors, arrays, sets, unordered_mapsiters.cpp - practice with inserting and erasing in STL lists
Fri, Nov 15Project 9 due
Aristotle_Ethics.zip
Emerson_Essays.zip
Mon, Nov 18re-visiting Makefiles, and Const
Wed, Nov 20a look at a real C++ library: TinyXMLreadxml.cpp, books.xml, products.xml
Fri, Nov 22Exceptions
Mon, Nov 25 Project 10 due
traffic_5_100_0.2.txt
traffic_5_100_0.5.txt
traffic_10_100_0.5.txt
traffic_10_100_0.9.txt
output_5f_1c.txt
output_5f_2c.txt
implementing Lists and Trees in C++expr.cpp (see slides)
Wed, Nov 27Reading Day(class cancelled)
Fri, Nov 29Thanksgiving(class cancelled)
Mon, Dec 2review
Wed, Dec 4 (last day of class)
Secure Coding
Fri, Dec 6final exam, 10:00-12:00


Academic Integrity Statement and Policy

Aggie Code of Honor: An Aggie does not lie, cheat or steal, or tolerate those who do.
see: Honor Council Rules and Procedures


Americans with Disabilities Act (ADA) Policy Statement

The Americans with Disabilities Act (ADA) is a federal anti-discrimination statute that provides comprehensive civil rights protection for persons with disabilities. Among other things, this legislation requires that all students with disabilities be guaranteed a learning environment that provides for reasonable accommodation of their disabilities. If you believe you have a disability requiring an accommodation, please contact Disability Services, in Cain Hall, Room B118, or call 845-1637. For additional information visit http://disability.tamu.edu.


Links