1 / 16

COP1220/CGS2423 Introduction to C++/ C for Engineers

COP1220/CGS2423 Introduction to C++/ C for Engineers. Professor: Dr. Miguel Alonso Jr. Fall 2008. Outline. Why Program? Computer Systems: Hardware and Software Programs and Programming Languages What is a Program Made of? Input, Processing, and Output The Programming Process

lana-ramsey
Download Presentation

COP1220/CGS2423 Introduction to C++/ C for Engineers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COP1220/CGS2423Introduction to C++/C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008

  2. Outline • Why Program? • Computer Systems: Hardware and Software • Programs and Programming Languages • What is a Program Made of? • Input, Processing, and Output • The Programming Process • Procedural and Object-Oriented Programming

  3. Why Program? • What does a computer do? • It is useful because it can be programmed, or told to do many different tasks. • They are tools that make almost every profession easier to do. • A computer is a machine specifically designed to follow instructions.

  4. Why Program? • Programs are called software, or a set of instructions that tells a computer what to do. • Programs in the real world consist of the following: • Logical flow of instructions • Mathematical procedures • Appearance on the screen • The way the information is presented to the user • The programs “user-friendliness” • Manuals and other written documentation

  5. Computer Systems: Hardware and Software Starting out with C++, Pearson, (2006)

  6. Computer Systems: Hardware and Software Starting out with C++, Pearson, (2006)

  7. Computer Systems: Hardware and Software • CPU: Controls the computer’s operations and performs arithmetic functions • Main Memory: Random Access Memory, or RAM, is the part of a computer that temporarily holds or stores information • Consists of cells and bits (a “switch” that can be a 0 or 1 • Each Cell has 8 bits, or a byte. • Each cell is assigned a location number called an address.

  8. Computer Systems: Hardware and Software

  9. Other Devices • Secondary Storage: Hard Disk, USB Stick • Input Devices: Any devices that help the computer collect information from the outside world • Output Devices: Devices that presents the computer’s information to the outside world.

  10. Software • Generally two categories of software in a computer: • Operating system • Application Software • Single Tasking • Multi-Tasking • Single-User • Multi-User

  11. Programs and Programming Languages • Computer Program: Set of instructions that tells a computer how to solve a problem or perform a task • Algorithm: A set of well defined steps for performing a task or solving a problem • A computer only understands 0’s and 1’s • Programming Languages were invented to ease the task of programming • Examples of Languages: C/C++, C#, JAVA

  12. Programming Languages • Low Level vs High Level • Your very first program!

  13. Source Code, Object Code, and Executable

  14. What is a program made of? • Language Elements

  15. Lines, Statements, and Variables • Line: single line as it appears in the body of the program (can be empty) • Statement: complete instruction that causes the computer to perform an action • Variable: named storage location in the computers memory for holding a piece of information. Usually stored in RAM. • Variable definition/declaration • Not the same thing! • There are generally two types of variables: numbers and characters. • Number: used to compute • Characters: used for display

More Related