Lab 1: Getting started ICE0125 Programming Fundamentals II – C/C++ Lab & homework regulations Introduction to programmer’s tools Working with Visual Studio 6.0 Logic building with C Lab assignments & Homework #1 Instructor: Tran Minh Trung Email: trungtm@icu.ac.kr
Lab regulations Lab instructor: Student: Reviews class lectures Demonstrates and illustrates examples Introduces Lab assignments Help student to understand/solve problems Student: Try to SOLVE easy assignments and QUESTION on hard assignments All have to stay and work on assignments till the end of the lab even when you think assignments are too easy (practicing is important).
Homework regulations There will be 10 hw assignments. Due before after a week. Late Acceptance: 50% penalty (No Exception). How to submit: Send email to: tuantla@icu.ac.kr Subject: [ICE0125] (YouID ) Homework # Attached files: Source code Readme (how to run program – if necessary) Document for none programming homework Note: You should compress files into one zip file with name: (Your student ID)_HW_#.zip Eg.: 20042117_HW_1.zip
Introduction to programmer’s tools What do you need? Text editor: WinEdit, VIM, Editplus …. Compiler: Why do you need a powerful programming tools? To manage a project with hundreds to thousands files To debug errors occurred in a program with thousands lines To use thousands of syntaxes that you can’t remember …. Existing powerful programming tools Microsoft Visual C ++; Bloodshed Dev C++; Borland C++
MS. Visual C++ 6.0 Create new project
Select project type
Select Console application type
Compiling a program
Building a program
Execute a program
Debug bar Right click on toolbar and select Debug option to show Debug bar Right click on the line that you want to Insert or Remove a Breakpoint
Start debugging
Debug functions
Stopping at a Breakpoint The “Watch” window will show the values of the variables
Checking a value of a variable
Others debug functions Step into Step out Step over Run to cursor Exceptions Threads Modules
Review of Chapter 2 & 3 Logic building with C
Chapter 2: Introduction to C programming Memory Concepts Understand variables: type, size, value Arithmetic in C Remember the precedence of arithmetic operators Decision Making: Equality and Relational Operators Remember the meaning and syntax of equality and relational operators
Chapter 3: Structured Program Development in C Basic problem-solving techniques 2 important primary steps Thorough understanding of the problem Carefully plan an approach for solving it Algorithms, Pseudo code, control structures Top-down, stepwise refinement 3 phases programming Initialization, processing, and termination Control statements If…else, while, nested control, counter and sentinel controlled repetition Operators: assignment, increment, decrement
[Lab 1] assignments #1 Chapter 2 Try Example in Fig.2.13 (pg. 42) Solve problem:2.19 (pg. 53)
[Lab 1] assignments #2 Chapter 3 Try Example in Fig.3.9 (pg. 77) Solve problem:3.20 (pg. 93)
Homework See the course website Deadline: 12 PM (Midnight), September 11 2008.