Introduction • Without software, the computer is useless. • Software is developed with programming languages. • C++ is one of the most popular programming languages. – TIOBE Index – LangPop.com – IEEE • C++ is suited for a wide variety of programming tasks.
C++ Versus C • C++ evolved from C, and you can think of C as being a subset of C++. • So in learning C++, you’re also learning C (and then some). C C++
• Other popular languages that evolved from C include Java, C#, Objective-C.
Software • Software: programs that do specific tasks. • System programs control the computer. – Operating system monitors the overall activity of the computer and provides services such as: • Memory management • Input/output activities • Storage management
• Application programs perform a specific task. – Word processors – Spreadsheets – Games
The Language of a Computer • Digital devices (computers, iPods, cell phones, …) use binary code to represent information. This means they store all information (numbers, text, images, music, …) as sequences of 0s and 1s. • Each 0 or 1 in such a sequence is called a bit (short for binary digit). • Example of an 8-bit sequence: 01101100 • A typical song in an MP3 file might contain 40 million bits.
The Language of a Computer (cont’d.) • Byte: – A sequence of eight bits
• Kilobyte (KB): 210 bytes = 1024 bytes • Table 1-1 on page 7(next slide) shows some other related terms. • This is useful general information, but not critical to what we’ll do in this course.
The Language of a Computer (cont’d.)
The Language of a Computer (cont’d.) • At least three different encodings have been used to represent text as sequences of 0s and 1s. • ASCII (American Standard Code for Information Interchange) – 128 characters; see Appendix C in textbook.
• EBCDIC – Formerly used by IBM.
• Unicode – 65,536 characters; covers most modern alphabets.
The Evolution of Programming Languages • Early computers were programmed in machine language., which required the programmer to type sequences of 0s and 1s. • To calculate wages = rate * hours in machine language: 100100 010001
//Load
100110 010010
//Multiply
100010 010011
//Store
The Evolution of Programming Languages (cont’d.) • Assembly language replaces sequences of 0s and 1s with mnemonics (abbreviations such as LOAD or MULT). • Using assembly language instructions, wages = rate * hours can be written as: LOAD rate MULT hour STOR wages
The Evolution of Programming Languages (cont’d.) • High-level languages include Basic, FORTRAN, COBOL, Pascal, C, C++, C#, and Java. Programs written in these language look much more like English. • Compiler: translates a program written in a highlevel language into machine language. • The equation wages = rate * hours can be written in C++ as: wages = rate * hours;
Processing a C++ Program
Processing a C++ Program (cont’d.) • Steps in processing a C++ program: – Use an editor to create source code in C++. – Preprocessor directives begin with # and are processed by the preprocessor. – Compiler: • Checks that the program obeys the language rules. • Translates into machine language (object program).
Processing a C++ Program (cont’d.) • Steps in processing a C++ program (cont’d.): – Linker: • Combines object program with other files to create executable code. • Library: contains prewritten code you can use.
– Loader: • Loads executable program into main memory.
– The last step is to execute the program.
Programming with the Problem Analysis– Coding–Execution Cycle • Algorithm: – Step-by-step problemsolving process – Solution achieved in finite amount of time
• Programming is a process of problem solving.
The Problem Analysis–Coding–Execution Cycle (cont’d.) • Step 1: Analyze the problem. – Outline the problem and its requirements. – Design steps (algorithm) to solve the problem.
• Step 2: Implement the algorithm. – Implement the algorithm in code. – Verify that the algorithm works.
• Step 3: Maintain. – Use and modify the program if the problem domain changes.
Example 1-1 • Design an algorithm to find the perimeter and area of a rectangle. • The perimeter and area of the rectangle are given by the following formulas:
Operating system monitors the overall activity of the computer and provides ... means they store all information (numbers, text, ... to what we'll do in this course.
Disk Operating System (DOS). What is DOS, and why learn about it? Microsoft developed the Disk Operating System (DOS) in 1981. DOS, which is sometimes called MS-DOS, was designed for the IBM PC. Windows 98 and Windows. 2000 both support DOS commands
Write the product in standard form. 5) (3 + 5i)(2 + 9i). 5). Find the product of the complex number and its conjugate. 6) -1 - 5i. 6). CHAPTER 1. Find the domain of ...
MAPS. 1. The VOC territories in Austronesian-speaking Asia, ca. the 1660s. 2. Indigenous ethno-linguistic groups of Taiwan. 3. Geographic distribution of ...
not in the domain. The only critical point is x = 0. As x moves away from 0 on either side, the values of y decrease. The function has a local maximum value at (0, ...... (b) Since. ,. dV. dV dr dt dr dt. = we have. 2 . dV dr rh dt dt Ï. = (c). 2. 2
373 cancelled each other and there is zero displacement throughout. To put the principle of superposition mathematically, let y1 (x,t) and y2 (x,t) be the displacements due to two wave disturbances in the medium. If the waves arrive in a region simul
9.1 Introduction. In mathematics, the word, âsequenceâ is used in much the same way as it is in ordinary English. When we say that a collection of objects is listed ...
In the late 1700s and early 1800s, he kept notes about his travels .... In 1762, he quit the company. In 1670, the Hudson's Bay Company held trading rights and.
The most familiar type of waves such as waves on a string, water waves, sound waves, seismic waves, etc. is the so-called mechanical waves. These waves require a medium for propagation, they cannot propagate through vacuum. They involve oscillations
In this Chapter different types of oscillations will be discussed. A particle carrying out oscillatory motion, oscillates around a stable equilibrium position (note: if ...
Mar 31, 2016 - ... Vitamix; Ecolab; Allen Brothers; Wisconsin Milk Marketing Board; Atlantic Veal & Lamb;. American Technical Publishers; Par-Way Tryson Company; The ... for chefs in the United States, with the Certified Executive Chef®, ... ACF on
How much Must I Know about Process Safety Management to be an Operator? Are there Any Organizations that Can Help Me in ... âTo the Extent they can affect the processâ Mean? How do I Properly Document this Training? ... are some Chemical Characte
These books have Spirit for theme. I shall never ... He said: 'I will make each of them threefold.' He and life .... "My son Bees create honey by gathering the sweet.
The 4 step numbers in the example below, are also labels ... 3 ⢠2 = 6 , is just the point 3 on a number line, being scaled by 2 (made twice as far from the origin).
order to communicate alarms from patient monitoring and therapeutic ... After implementation of the central application (AM), as specified in the ACM profile,.
SPSS (version 12.0, SPSS Inc.) was used for all analysis. .... ence of prehospital ECG predictive of a reduced door-to-balloon time (mean ± SE) by 38.8 ... Lastly, a multivariate logistic regression model was constructed to determine the sig-.
Taking a job at Starbucks would mean giving up that $75,000 a year job, the ...... signatures of people who no longer ...... The pagination of this electronic.
converged to the highest peak because the selective pressure focuses attention to the area of .... thus allowing the formation of non-equal hyper-volume niches. In order to ..... The crossover operator exchanges the architecture of two ANNs in.
strategy entails, the research findings are difficult to compare. .... rooms (cf. Li 1984; Wu 2001; Yu 2001). Comprehensive Surveys of EFL Learner Behaviours.
For example, based on historical data, an insurance company could apply ..... ios we explicitly assume that the only goal of data mining is to optimize accuracy.