100 likes | 111 Views
Learn the fundamentals of problem solving and algorithm design using the C++ programming language. Define problems, design algorithms, and translate them into programs. Includes examples and exercises.
E N D
Programming Introduction to Programming
Objectives • To learn fundamental problem solving techniques: • define a problem • design an algorithm • translate into a program • To learn to use the C++ programming language algorithm
Work Computer Product Program Algorithm • Sequence of instructions, expressed in • plain informal, human, everyday language • pseudo-code (pseudo computer program) • flowchart counter = 10 while (counter not equal 0) { decrease counter value }
“Compute volume of a sphere” input : radius process : use formula output : A “What should I do today?” input: day of the week process: output: action Problem Solving and Algorithm Read section 1.2 (pp.13-18) if (day = MON, WED, or FRI) action = go_to_school; else action = go_to_party;
Work Work Computer Worker Product Product Program Instructions What is C++? • C++ is a programming language. • A formal, computer program performs a specific task • It may interact with the user • Human work model: • Computer work model:
What is C++? • The most popular programming languages: • C++ (derived from C) • Basic • Pascal • Java • Perl • COBOL • Scheme (Lisp) • Smalltalk • The most common compilers of C++: • Microsoft Visual C++ • Borland C++ • g++ (for Unix machines)
Why C++? • Bad News: • C++ is not easy to learn • Good News: • Lots of well paid and interesting jobs for C++ programmers • Most flexible (e.g. database, graphics) • More low level or system control (e.g. device drivers, operating systems)
Who Uses C++? • Computer makers such as Sun, SGI, IBM, and HP • Airport • Computer chip manufacturers like Motorola & Intel • Software companies • Banks • Hong Kong Government • Hospital Authority • Telecommunications • Universities • Startup and .com companies
Most Important Feature of C++ • Most important feature of C++:PORTABILITY • C++ runs on: • PC • Macintosh • Unix workstations (also, Unix versions of C++ are free!) • supercomputers
What Can We Do By the End of the Course? • Program the computer in applications such as the following: • Program a simple calculator • Program simple computer games • Program a small inventory system for a small company • You will be ready to take on part-time programming jobs during Xmas break!