Image

NENG/TENH 202 Introduction to Computer Programming for Engineers

Spring 2013


Home

Research

Publications


Teaching

Prof. Xue

Links

Instructor:      Prof. Y. Alex Xue

Office: CESTM B230C   Phone: (518) 956-7220   Email: yxue@albany.edu

 

Meeting Time and Location:
TuTh 8:45-10:05 AM NFE Computer Classroom


Office Hour: Thursday 3:00-4:00 PM Or by email appointment.


Teaching Assistant/Assignmens:

  • Mr. Chris Stiles has kindly accepted to serve as teaching assistant ( cstiles@albany.edu )
  • There will be three programming assignments.
  • Email your questions/solutions to Mr. Stiles

Course Description:

C Programming section of this course introduces the C programming language and fundamental programming concepts and prepare you for courses that assume backgrounds in computer programming. Topics include variables, data types, functions, control structures, pointers, and arrays. You need access to any programming environment that allows you to write, edit, compile, link, and debug a C program. Familiarity with fundamental programming language concepts such as variables, data types, and compiling source code is helpful.


Matlab section of this course provides an introduction to the Matlab technical computing environment. No prior programming experience or knowledge of Matlab is assumed, and the course is structured to allow thorough assimilation of ideas through hands-on examples and exercises. Topics Include: working with the Matlab user interface; working with data files and data types; automating commands with scripts; writing programs with logic and flow control; writing functions; performing analysis on vectors and matrices; visualizing vector and matrix data.

 
Prerequisite
:
 Satisfactory completion of NSCI/NENG 110 and NSCI/NENG 120.

Programming Tools: We'll be using cgywin (online documentation), gcc (online documentation) and notepad++ (website). You may also access them via the ITS Virtual Information Commons.


Course Text
The required text is C Programming: A Modern Approach (2nd edition) (<-- clicking on the title leads you to the book website) by K.N. King.  Lectures on MATLAB are based on the book by S. Attaway, MATLAB: A Practical Introduction to Programming and Problem Solving, Butterworth-Heinemann (2009).


Additional Textbooks on C programming:
(1) The traditional standard book is K&R, The C Programming Language, 2nd edition. You can find it at Amazon.com here.
(2) Two other popular books on C programming are those by Stephen Prata (C Primer Plus) and Stephen Kochan (Programming in C).
(3) The standard text on scientific computing using C is Numerical Recipe in C: The Art of Scientific Computing.

Grades:  There are no midterm and final exams. Your grades will be based on three programming projects. Projects must be turned in as specified by the instructor. Late return will not be accepted.

 

Course Website http://www.albany.edu/~yx152122/NENG202-13.html.
Lecture notes and additional teaching materials including links to online resources will be posted at the course website. Additional information on C programming can also be found at the google group comp.lang.c

 

Weekly Course Materials:


  Weeks                           Lecture Topic                                                      Lecture Materials                               Assignments             
      

 Week 1

  01/24
  Course introduction; Introducing C
 King Ch. 1, Ch.2.1 Week-1.pdf
Ten reasons to learn C programming

 Week 2

  01/29-01/31
  C Fundamentals
  Unix/Linux Tutorials

 King Ch.2 Week-2.pdf

 Week 3
  02/05-02/07
  How Computers Store Numbers;
  Formatted Input/Output;
 King Ch.3 Week-3.pdf
 Week 4
  02/12-02/14
  Arithemetic Operators;Assignment Operators;
  Expression Evaluation
 King Ch.4 Week-4.pdf

 Week 5
  02/19-02/21
  Logical Expressions;The if and switch Statements
 King Ch.5 Week-5.pdf

 Week 6
  02/26-02/28
  The Looping Statements  King Ch.6 Week-6.pdf
 

 Week 7
  03/05-03/07
  Basic Data Types and Type Conversion  King Ch.7 Week-7.pdf
Assignment 1 (30%)
(Due on 03/08 5:00PM) :
Ch.4 Programming Project 1
Ch.6 Programming Project 5
Extra Problem for Honors:
Ch.5 Progmming Project 3
 Week 8
  03/12-03/14
  One-Dimensional Arrays;
 
 King Ch.8.1 Week-8.pdf

 Week 9
  03/19-03/21
  Spring Break (No Class)
 

 Week 10
  03/26-03/28
  Multidimensional Arrays
 King Ch.8.2 Week-9.pdf


 Week 11
  04/02-04/06
  Defining and Calling Functions; Function
  Aruguments and Termination
 King Ch.9.1-Ch.9.5  Week-10.pdf
  random_walk.c

Week 12

04/09-04/11

Recursion; Local and External Variables

King Ch. 9.6 and Ch.10.1-10.2
Week-11.pdf
Assignment 2 (30%)
(Due on 04/19 5:00PM) :
Ch.8 Programming Project 16
Ch.9 Programming Project 4

For Honors, the 2nd problem is:
Ch.9 Progmming Project 8

Week 13

04/16-04/18

Pointers and Pointer Arithmetic
King Ch.11 and Ch 12.1 Week-12.pdf
Tutorial on Pointers and Arrays in C



Week 14

04/23-04/25
Pointers and Arrays; Dynamic Storage Allocation
King Ch. 12.2-Ch.12.4 Week-13.pdf



Week 15

04/30-05/02
Strings and C String Library
King Ch. 13.1-13.5  Week-14.pdf



Week 16
05/07
Arrays of Strings; Introduction to MATLAB.
MATLAB Documentation
King Ch. 13.6-13.7 Week-15.pdf
Matlab-Intro.pdf








Final TA Session:

05/15 11:00AM-1:00PM

Assignment 3 (40%)
(Due on 05/16 5:00PM) :
Ch.12 Programming Project 6
Ch.13 Programming Project 18

For Honors (Note the changes):
Ch.12 Programming Project 6 (10%)
Ch.13 Programming Project 2 (a) & (b) (15% each)