170 likes | 366 Views
Computer Programming. Topic 1 Introduction to Programming. Objectives. Define the terminology used in programming Explain the tasks performed by a programmer Describe the qualities of a good programmer Understand the employment opportunities for programmers and software engineers
E N D
Computer Programming Topic 1 Introduction to Programming
Objectives • Define the terminology used in programming • Explain the tasks performed by a programmer • Describe the qualities of a good programmer • Understand the employment opportunities for programmers and software engineers • Become aware of structured design
Programming a Computer • Programs are the directions given to computers • Programmers are the people who write computer programs • Programming Languages enable programmers to communicate with the computer • Popular languages: C++, Visual Basic, C#, Java
The Programmer’s Job • Programmers help solve computer problems • Employee or freelance • Typical steps involved • Meet with user to determine problem • Convert the problem into a program • Test the program • Provide user manual
Do I Have What It Takes to Be a Programmer? • Qualities employers look for • Logical and analytical thinking • Close attention to detail • Patience and persistence • Ingenuity and creativity • Good communication skills: technical and nontechnical • Business skills (for managerial positions)
Employment Opportunities • Computer software engineers: designs an appropriate solution to a user’s problem • Computer programmer: codes a computer solution • Coding is the process of translating a computer solution into a language a computer can understand • Some positions call for both engineering and programming
Problem Solving • People solve hundreds of simple problems every day without thinking about how they do it • Understanding the thought process involved can help in solving more complex problems • You can also use a similar process to design a computer solution to a problem (computer program)
Structured Programming • Structured design • Dividing a problem into smaller subproblems • Structured programming • Implementing a structured design • The structured design approach is also called: • Top-down (or bottom-up) design • Stepwise refinement • Modular design
Implementation #include <iostream> using namespace std; int main() { const float KM_PER_MILE = 1.609; float miles, kms; cout << “Enter the distance in miles: “; cin >> miles; kms = KM_PER_MILE * miles; cout << “The distance in kilometers is “ << kms << endl; return 0; }
Testing, Execution, Debugging Common error sources • Violations of grammar rules of the high level language • Errors that occur during execution • Errors in the design of the algorithm
Summary • Programs are step-by-step instructions that tell a computer how to perform a task • Structured design • Problem is divided into smaller subproblems • Each subproblem is solved • Combine solutions to all subproblems
Bibliography • Zak, D. (2011). An Introduction to Programming with C++, 6th ed. Course Technology, Massachusetts. • Bronson, G.J. (2006). A First Book of C++: From Here To There, 3rd ed. Course Technology, Massachusetts. • Malik, D.S. (2009). Introduction to C++ Programming, Brief International ed. Course Technology, Massachusetts. • Friedman, F.L. & Koffman, E.B (2011). Problem Solving, Abstraction, and Design Using C++. 6th ed. Pearson Education, Massachusetts. • Adams, J. & Nyhoff, L. (2003). C++ An Introduction to Computing. 3rd ed. Pearson Education, New Jersey.