Notes for SE5120, by Dr Jan Pajak
SE5120 course carries 15 credits, or 150 learning hours. It extends for two
terms, or one semester, means for 16 weeks in total. It represents stage 1
of programming course in C language. It is composed of two parts,
namely training part 1 (10 weeks), and project part 2 (6 weeks).
The lecture notes and example programs that I am presenting here
are prepared for the Borland C++ Builder version 6 (but utilised
as C language compiler).
Notice that:
- In order to run or to download any of these items, simply
click on the underlined part of
the description of this item!
- For further instructions see the end of this web page.
- Click the button BACK (from the browser) to return to the previous web page.
Course outline:
Course Outline (for block 3 and 4 of 2003).
Theory Content:
Theory content of this course is based on the materials handed out to students.
However, the preliminary use of following textbook would be helpful (this
textbook is to be used for SE5220 - which represents stage 2 of this course):
[1] Deitel and Deitel: C++ How to Program, 4th Edition, Prentice Hall, ISBN 0-13-111881-1.
Practical laboratory content:
(2003 - part 1) Notes for the instruction part of SE5120 (i.e. first 10 weeks):
Exercise 1 (Introduction; interactive processing, general structure of a C program, “hello world” C program.)
Exercise 2 (Iterative statements: “while”, “do while”, and “for” loops.)
Exercise 3 (If statements. Relational operators. Compound conditions. Switch statement.)
Exercise 4 (Functions. Pass by value, pass by reference.)
Exercise 5 (Disk I/O and file handling in C.)
Exercise 6 (Console I/O formatting in C.)
Exercise 7 (Identifiers, data types, and C variables.)
Exercise 8 (String handling and string functions in C.)
(2003 - part 2) Notes for the project part of SE5120 (i.e. another 6 weeks):
Project specification (Project 1, C langauge).
Appendix B1 to Project 1 (Feasibility study.)
Appendix B2 to Project 1 (Program specification.)
Appendix B3 to Project 1 (Program design.)
Appendix B4 to Project 1 (Programming.)
Appendix B5 to Project 1 (Program testing.)
Appendix B6 to Project 1 (Program presentation.)
2003 Assessments:
(2003 - part 1 Assessment) Examples of assessment for part 1 of SE5120 (i.e. first 10 weeks):
Assignment 1 for C. (SE5120).
Assignment 2 for C. (SE5120).
Sample problems for test 1. (SE5120)
Assignment 3 for C. (SE5120).
Sample problems for test 2. (SE5120)
2003 Sample solutions:
(2003 - teaching solutions) Examples of solutions for lectures and exercises - part 1 of SE5120 (i.e. first 10 weeks):
Exercise 1:
Program hello.c example of source code. Console C source code: (basic solution for hello world program).
Program hello example of EXE file. Executable program C for a hello world program.
Program size_int.c example of source code. Console C source code: (basic solution for size_int.c program).
Program size_int example of EXE file. Executable file for a C program named size_int.
Program divisors.c example of source code. Console C source code: (basic solution for divisors.c program).
Program divisors example of EXE file. Executable file for a C program named divisors.
Exercise 2:
Times table program - example of source code. Console C source code.
Times table program - example of EXE file. Executable file for a C program.
Menu program - example of source code. Console C source code.
Menu program - example of EXE file. Executable file for this program in C.
Instructions on how to use this web page:
(1) Each C++ program is provided here in two versions, namely
(a) as a source code (*.cpp), which is prepered for the Borland C++
Builder 5 or 6 (but in most of cases it also works on Microsoft Visual
Studio 6 C++), and
(b) as an executable version of a given C program (*.exe).
Each one of these two versions needs to be downloaded separately.
(2) In order to download to your computer any of these two versions (*.cpp
or/and *.exe) of a given C solution,
click on this version,
and then follow the instructions that appear in the downloading window.
(3) To return to this web page, click on the Back
button on the tool palette of your browser.
(4) Some solutions are compressed into standard zip
files. Therefore, you need to unzip them first before they are executed or compiled.
(5) If you wish to see any other related web pages - see the Links Page
(e.g. the so-called "Blue Book" with prescriptions for PR621 (former PR21n) courses addressed
here, are available at the web page
http://www.naccq.ac.nz/bb_view/bbpre.html).
(6) Address for correspondence (July 2005): Dr Jan Pajak, P.O. Box 33250, Petone 6340, New Zealand.
The latest update of this web page: 23 July 2005.
3446
|