Download presentation
Presentation is loading. Please wait.
1
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30
2
Introduction to C++ Programming Instructor: Teresa Cole Office: MEC 302L Phone: 426-2485 Email: tcole@emerald.boisestate.edu Office Hours: (tentative) Monday 3:00 - 4:00 pm Tuesday 9:00 - 10:00 am Wednesday 3:30 - 4:30 pm Thursday 11:00 - 12:00 am Friday 9:40 - 10:40 am
3
Internet Resources There will be an email list for this class which all students are required to subscribe to. The course web page http://cs.boisestate.edu/~tcole/cs117/
4
Textbooks Choose from l Essential C++ for Engineers and Scientists by Jeri R. Hanly l Problem Solving, Abstraction and Design Using C++ by Frank L. Friedman and Elliot B. Koffman
5
Programming All students will have accounts on emerald, a Computer Science Department computer running the Linux operating system Programs will be submitted and graded on emerald
6
Programming t Development may be done on any computer t It is the responsibility of the student to be sure that programs run on emerald. t Programs that don't run on emerald will receive a maximum score of 60%.
7
7 Computer Components
8
8 t Every computer is organized roughly into six parts –CPU - central processing unit Where decisions are made, computations are performed, and input/output requests are delegated –Main Memory Stores information being processed by the CPU –Secondary Memory Stores data and programs 1.2 Computer Hardware
9
9 –Input devices Allows people to supply information to computers –Output devices Allows people to receive information from computers –Network connection Modems / Ethernet interface Computer Hardware
10
10 Main Memory -27.2 l 354 l.005 75.62 l Address l Contents 0 1024 1
11
11 Main Memory t Stores –programs –data –results t Types –RAM –ROM
12
12 Secondary Memory & Storage t Semi permanent data-storage capability –Tape or Disk –Hard disk –CD ROM t Secondary memory has much more storage capacity
13
13 CPU t “Brains” of the computer –Arithmetic calculations are performed using the Arithmetic/Logical Unit or ALU –Control unit decodes and executes instructions t Arithmetic operations are performed using binary number system
14
14 Input / Output Devices t Accessories that allow computer to perform specific tasks –Receiving information for processing –Return the results of processing –Store information t Common input and output devices –PrinterJoystickCD-ROM –KeyboardMonitor
15
15 Computer Networks t LAN - Local area network –Organizational t WAN - Wide area network –Internet
16
16 t Application software –Programs designed to perform specific tasks that are transparent to the user t System software –Programs that support the execution and development of other programs –Two major types Operating systems Translation systems 1.3 Computer Software
17
17 Application Software t Application software is the software that has made using computers indispensable and popular t Common application software –Word processors –Desktop publishing programs –Spreadsheets –Presentation managers –Drawing programs
18
18 t Controls and manages the computing resources t Important services that an operating system provides –File system –Commands that allow for manipulation of the file system –Ability to perform input and output on a variety of devices –Management of the running systems t Examples –MSDOS ®, Windows ®, Unix ® Operating System
19
19 Programming Languages t Machine Language –“Native tongue” of the computer –Binary 0s and 1s that specify what to do 0010 0000 0000 0100 1000 0000 0000 0101 0011 0000 0000 0110 t High - Level Languages –Resemble human language (C++, C, Pascal) cost = price + tax;
20
20 OO Programming and Structured Programming t Object-oriented design and programming supports good software engineering t Object-oriented design promotes thinking about software in a way that models the real world
21
21 OO Programming and Structured Programming t Algorithms are the basis for the procedural sections (Structured Programs) –Highly structured –Top-down design –Step-wise refinement
22
22 Object Oriented Design t Modularity –Dividing an object into smaller pieces or modules such that the object is easier to understand and manipulate t Hierarchy –Ranking or ordering of objects based on some relationship between them
23
23 OO Classes t Later we will use data abstractions –C++ language t Will apply OO techniques –Structured Programming –Object Oriented Programming t Model our own objects or abstractions
24
24 Processing a Program t Editor used to enter the program –Source program (file.cpp) –UNIX vi text editor t Compiler translates the source program –Displays syntax errors (not descriptive) t Linker/Loader to combine object file with other object files –Executable program
25
25 Process Cycle
26
Software Development Method t Problem Analysis t Design t Implementation t Testing t Documentation
27
27 Applying the Software Development Method –Analysis The first step in solving this problem is to determine what you are asked to do. You must convert from one system of measurement to another, but are you supposed to convert from kilometers to miles, or vice versa? The problem states that you prefer to deal in metric measurements, so you must convert distance measurements in miles to kilometers.
28
28 Applying the Software Development Method –Design The next step is to formulate the algorithm that solves the problem. Begin by listing the three major steps, or sub problems, of the algorithm. –Implementation To implement the solution, you must write the algorithm as a C++ program. –Testing How do you know the sample run is correct?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.