CMPSC 201C
Computer Programming for Engineers Using C++
-- Homepage --


(3 credits) Development and implementation of algorithms in a procedure- oriented language, with emphasis on numerical methods for engineering problems.

  Pre-requisites : MATH 140
Students who have passed CMPSC 101, 201F, or CSE 103 may not schedule this course.
  Concurrent : MATH 141
  Course Objectives : As primary course objectives students will be able to develop algorithms and data structures from software specifications and develop C++ code. They must be able to analyze algorithms and computer code for correctness and correct software faults. They must interpret the specifications of general and special purpose software languages, and use these languages to design computer programs that are correct and efficient.

Important Links

  List of projects and due dates
  Your Textbook
  Login to the Linux Server
  A word on filestructures
  Important UNIX Commands
  The vi text-editor (no GUI needed)
  gedit text editor (needs GUI)
  Next quiz

Topics to be covered (tentative)

  1. Important background information (2 lectures)

    Components of Computers : CPU , RAM , Storage, Input/Output, Operating Systems and software
    Login to the LINUX server
    Introduction to UNIX : commands, file structure
    text-editors ( vi , gedit ) vs. word processors
    Compiling, linking, and executing a short program called hello
    g++ hello.cpp -o hello
    ./hello
    Unix tricks : command repetition , filename completion
  2. Basic Concepts (1 lecture)

    Structure of a program
    Binary (and other) Number Systems
    Introduction to variables (program) Concept, naming rules, declaration, assignment
    Data types : Integer , real(3) , bool (1)
  3. Odds and Ends (brought when needed)

    Formatting your output
    Dealing with erroneous user input
  4. C++ : Basic mathematical expressions

    Arithmetics : assignments,addition,subtraction,multiplication,division, remainder (integer only), special operator (program integerMath.cpp)
    Special mathematical functions ( double only ) : exponentiation, sqrt, trig functions (Appendix B in text)
  5. C++ : Making Decisions(2 lectures)

    logical expressions (true/false) ( < > == etc.)
    relational expressions with arithmetic expressions
    logical data type
    logical operators ( && || )( < > ==
    if - else - else if
    nesting and switch
  6. Looping (3 lectures)

    for loop
    while and do-while loop
    counter vs. sentinel (flag) controlled repetition
    while () {} stopped by counter or some event
    while : finding root with bisection ,
    do while : finding root with Newton's method
    for : Nested repetition
  7. User supplied functions (4 lectures)

    System-supplied function returning single values, Example
    Some commonly used sytem functions
    User-supplied function returning single values, Example
    Returning multiple values, Example 1
    Returning multiple values, Example 2
  8. File input/output (1 lecture)

    open , read , write , append , close
    sample program
  9. 1-D Arrays (3 lectures)

    declaration , data type, name , elements , size , initialization of elements
    sample program
    vectors and arrays
    program : vector arithmetic ( add , magnitude , multipication )
  10. Working on numerical lists (2 lectures)

    searching , minimum , maximum , deletion , insertion , sorting , deletion
    program : sorting 2 lists using arrays
  11. Multi-dimensional arrays (2 lectures)

    declaration , data type, name , elements , size , initialization of elements
    matrices and arrays
    program : matrix arithmetic ( add , magnitude , multipication )
    Linear system of equations, Gaussian elimination
  12. Character C-strings (2 lectures)

    character variables , strings , initialization
    supplied string-functions (length , compare , copy ... )
  13. Numerical integration (2 lecture)

    Left-point integration , refining interval size
    Mathematics for trapezoidal and Simpson's rule
  14. Numerical Solutions to Differential Equations (2 lectures)

    Euler's method and algorithm
    Runge-Kutta Method
  15. Introduction to Matlab (2 lectures)

Last revised: 08/22/13