This chapter introduces computers and programming. It discusses the history and components of computers, operating systems, and networking. It also covers the evolution of programming languages from machine languages to high-level languages like C and C++. The chapter concludes with an overview of typical software and hardware trends.
The document discusses structured program development and control structures in programming. It introduces algorithms, pseudocode, and the basic control structures of sequence, selection (if and if/else statements), and repetition (while loop). It provides examples of using these control structures, including flowcharts, to develop structured programs through stepwise refinement of algorithms.
Real World Java Compatibility (Tim Ellison)Chris Bailey
油
Ever wonder how Java achieves such success in the write once, run anywhere (WORA) promise? In this talk, a senior member of the IBM Java team speaks candidly about the many difficulties Java faces behind the scenes around compatibility, and the various perspectives to consider. We describe areas such as bugs, bug fixes, algorithmic implementation assumptions, optimizations, multiple JVM implementations, and language changes. Hear how IBM is making Java better by championing compatibility and by contributing directly to OpenJDK. By the end of the session you will have clear insights on the complexity of the issue and how its addressed in the OpenJDK ecosystem.
Programming Languages and Program DevelompentSamudin Kassan
油
The document discusses various programming languages and program development tools. It describes low-level languages like machine language and assembly language. It then covers procedural languages like C and COBOL. Next, it discusses object-oriented programming languages like Java, C++, C#, and the .NET Framework. It also mentions integrated development environments and visual programming tools.
A framework is the design of an application or subsystem expressed as a set of abstract classes and the way objects in those classes collaborate. Users build applications using a framework by creating subclasses, configuring objects together, and modifying examples. Frameworks invert control so the reused code calls the user's code. Parts of a framework application include new classes and a script that creates, connects, and parameterizes components.
Olga Beregovaya, CEO Americas, PROMT
PROMT's approach to engine hybridization differs from many other companies technology, using statistical methods on every stage of translation process: pre-editing, transfer and post-editing. The hybrid engine defines syntactic, lexical and grammar choices on an atomic level, rather than processing complete translated sentences. Pilot case examples will be used to demonstrate the robustness of advances.
The document discusses 7 ways for companies to break the cost barrier of trade promotion management (TPM) software. It recommends following best practices like using Excel appropriately, setting realistic implementation goals, choosing a software provider that shares implementation risks, and rolling out technology in manageable phases. The presentation concludes by taking questions from the audience.
The document is a chapter about pointers from a textbook on C programming. It discusses pointer variable definitions and initialization, the pointer operators & and *, calling functions by reference using pointers, and the relationships between pointers, arrays, and strings. The chapter objectives are to learn how to use pointers, pass arguments to functions using call by reference with pointers, understand the relationships among pointers, arrays, and strings, and use pointers to functions and arrays of strings.
This document outlines a chapter about functions in C programming. It discusses how functions allow programs to be modularized by breaking them into smaller pieces called modules. Functions can be user-defined or come from standard libraries. Functions take parameters as input, perform operations, and return output. Functions allow for abstraction, reusability, and avoidance of code repetition. The chapter covers defining functions, function prototypes, parameters, return values, and calling functions. It also provides examples of commonly used math library functions.
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, as well as different types of programming languages like machine language, assembly language, and high-level languages. The chapter also summarizes the history and uses of C, C++, Java, and the standard library. It outlines the typical process of developing a C program and trends in hardware, networking, and the internet.
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, the evolution of operating systems, and different types of programming languages from machine code to high-level languages like C. The chapter also summarizes the history and uses of C, C++, and Java, and covers structured programming, typical development environments, and trends like hardware improvements and the internet. The objectives are to understand basic computer concepts and familiarize readers with various programming languages and their applications.
This document is the first chapter from a textbook on C++ programming. It provides an introduction and overview of key topics that will be covered, including:
- The history and evolution of computers, programming languages, operating systems, and software trends like object technology.
- Descriptions of low-level machine languages, assembly languages, and high-level languages like C++.
- Explanations of basic C++ concepts like variables, data types, input/output, and simple programs to demonstrate printing text and performing calculations.
- Overviews of related technologies like the Internet, World Wide Web, Java, and other programming languages.
The chapter establishes foundational knowledge and previews the scope of
This document is the first chapter from a textbook on C++ programming. It provides an introduction and overview of key topics that will be covered, including:
- The history and evolution of computers, programming languages, operating systems, and software trends like object technology.
- Descriptions of low-level machine languages, assembly languages, and high-level languages like C++.
- Explanations of basic C++ concepts like variables, data types, input/output, and simple programs to demonstrate printing text and performing calculations.
- Overviews of related technologies like the Internet, World Wide Web, Java, and other programming languages.
The chapter establishes foundational knowledge and previews the scope of
This document is the first chapter from a textbook on C++ programming. It provides an introduction and overview of key topics that will be covered, including:
- The history and evolution of computers, programming languages, operating systems, and software trends like object-oriented programming.
- Basic concepts like computer hardware, software, memory, processors, input/output, and languages at different levels like machine code, assembly, and high-level languages.
- Networking technologies like the Internet and World Wide Web and how they have changed computing.
- Examples of simple C++ programs that demonstrate printing text, taking user input, and performing basic math operations. These examples are analyzed line-by-line to explain
This document provides an introduction to computers, the Internet, and the World Wide Web. It outlines the objectives to be covered, which include basic hardware and software concepts, programming languages, object-oriented programming, and the history of C++, Java, and the Internet. The document then covers sections on computer organization, operating systems, personal and distributed computing, programming languages from machine code to high-level languages, and the histories of C, C++, and Java. It emphasizes building programs using existing reusable classes and functions from libraries to avoid reinventing components.
This document provides an introduction to programming concepts and the C programming language. It outlines the objectives of learning C and describes computer hardware, early operating systems, programming languages including Fortran, COBOL, Pascal, Ada and C. The document discusses the typical development process for a C program and provides brief histories of the Internet and World Wide Web.
The chapter provides an introduction to computers, programming languages, and C++. It discusses the history and components of computers. It also covers the evolution of operating systems, programming languages like C++ and Java, and software trends like object technology. The chapter concludes with an overview of a typical C++ development environment and examples of simple C++ programs.
This document provides an introduction to computers, programming languages, and the history of the internet and world wide web. It discusses the basic components of a computer and how they work together. It describes the different types of programming languages from machine language to high-level languages like C. It outlines the history and purposes of various programming languages including Fortran, COBOL, Pascal, Ada, and C. It also summarizes the history of the internet and world wide web and how they have changed communication globally.
This slides present a knowledge of computer, memory, programming languages etc. That is required before learning C programming language.
http://www.learnbywatch.com
This chapter introduces key concepts related to computers, programming languages, and Java. It describes the basic parts of a computer and how they work together. It outlines the evolution of operating systems and different models of computing. It also discusses the history and characteristics of various programming languages like Java, C++, and FORTRAN. Additionally, it introduces object-oriented programming concepts like classes, objects, and design patterns. Finally, it provides an overview of the structure of a typical Java development environment.
Introduction to C language
C is a general-purpose programming language that is extremely popular, simple, and flexible to use. It is a structured programming language that is machine-independent and extensively used to write various applications, Operating Systems like Windows, and many other complex programs like Oracle database, Git, Python interpreter, and more.
The document provides an outline of topics for an introduction to computers and C++ programming. It covers the history of computers and operating systems, from early batch processing to modern distributed computing. It also discusses different types of computer languages at different levels of abstraction, from machine language closest to hardware to high-level languages like C++.
Computers can perform calculations and logical decisions millions to billions of times faster than humans. They operate based on programs which are sets of instructions, and have hardware components like processing units and memory as well as software programs. Common computer systems have units for input, output, memory, processing, and storage. Operating systems were developed to make computers more convenient to use and allow for multiprogramming and timesharing. Personal, distributed, and client/server computing expanded how computers are used. Programming languages have evolved from low-level machine languages to high-level languages like Java which are easier for humans to read and write.
This document provides information about a C++ programming course, including:
- Details about lectures, assignments, exams, grading, and policies
- An overview of computer languages from machine language to high-level languages like C++
- A brief history of C and C++ and their uses
- Examples of simple C++ programs that print text, get user input, perform calculations, and use conditional statements
The carbon cycle plays an important role in regulating carbon levels on Earth. As humans cut down more trees and burn fossil fuels, carbon dioxide levels increase in the atmosphere, exacerbating global warming. The carbon cycle involves carbon moving from the atmosphere to plants through photosynthesis, then to animals that eat plants, and eventually back to the atmosphere through respiration and decomposition. Maintaining the balance of the carbon cycle is critical for sustaining the food chain and regulating carbon levels in oceans, forests, and the atmosphere.
The document discusses the Downs Process for extracting sodium through the electrolysis of molten sodium chloride, where sodium ions are reduced to sodium atoms at the cathode and chlorine gas is produced at the anode. It also describes how sodium hydroxide is produced through the electrolysis of sodium chloride solutions, and lists some common uses of sodium and sodium hydroxide such as in soap production, as a drain cleaner, and for lighting.
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, as well as different types of programming languages like machine language, assembly language, and high-level languages. The chapter also summarizes the history and uses of C, C++, Java, and the standard library. It outlines the typical process of developing a C program and trends in hardware, networking, and the internet.
This chapter introduces key concepts about computers and programming. It discusses the history and components of computers, the evolution of operating systems, and different types of programming languages from machine code to high-level languages like C. The chapter also summarizes the history and uses of C, C++, and Java, and covers structured programming, typical development environments, and trends like hardware improvements and the internet. The objectives are to understand basic computer concepts and familiarize readers with various programming languages and their applications.
This document is the first chapter from a textbook on C++ programming. It provides an introduction and overview of key topics that will be covered, including:
- The history and evolution of computers, programming languages, operating systems, and software trends like object technology.
- Descriptions of low-level machine languages, assembly languages, and high-level languages like C++.
- Explanations of basic C++ concepts like variables, data types, input/output, and simple programs to demonstrate printing text and performing calculations.
- Overviews of related technologies like the Internet, World Wide Web, Java, and other programming languages.
The chapter establishes foundational knowledge and previews the scope of
This document is the first chapter from a textbook on C++ programming. It provides an introduction and overview of key topics that will be covered, including:
- The history and evolution of computers, programming languages, operating systems, and software trends like object technology.
- Descriptions of low-level machine languages, assembly languages, and high-level languages like C++.
- Explanations of basic C++ concepts like variables, data types, input/output, and simple programs to demonstrate printing text and performing calculations.
- Overviews of related technologies like the Internet, World Wide Web, Java, and other programming languages.
The chapter establishes foundational knowledge and previews the scope of
This document is the first chapter from a textbook on C++ programming. It provides an introduction and overview of key topics that will be covered, including:
- The history and evolution of computers, programming languages, operating systems, and software trends like object-oriented programming.
- Basic concepts like computer hardware, software, memory, processors, input/output, and languages at different levels like machine code, assembly, and high-level languages.
- Networking technologies like the Internet and World Wide Web and how they have changed computing.
- Examples of simple C++ programs that demonstrate printing text, taking user input, and performing basic math operations. These examples are analyzed line-by-line to explain
This document provides an introduction to computers, the Internet, and the World Wide Web. It outlines the objectives to be covered, which include basic hardware and software concepts, programming languages, object-oriented programming, and the history of C++, Java, and the Internet. The document then covers sections on computer organization, operating systems, personal and distributed computing, programming languages from machine code to high-level languages, and the histories of C, C++, and Java. It emphasizes building programs using existing reusable classes and functions from libraries to avoid reinventing components.
This document provides an introduction to programming concepts and the C programming language. It outlines the objectives of learning C and describes computer hardware, early operating systems, programming languages including Fortran, COBOL, Pascal, Ada and C. The document discusses the typical development process for a C program and provides brief histories of the Internet and World Wide Web.
The chapter provides an introduction to computers, programming languages, and C++. It discusses the history and components of computers. It also covers the evolution of operating systems, programming languages like C++ and Java, and software trends like object technology. The chapter concludes with an overview of a typical C++ development environment and examples of simple C++ programs.
This document provides an introduction to computers, programming languages, and the history of the internet and world wide web. It discusses the basic components of a computer and how they work together. It describes the different types of programming languages from machine language to high-level languages like C. It outlines the history and purposes of various programming languages including Fortran, COBOL, Pascal, Ada, and C. It also summarizes the history of the internet and world wide web and how they have changed communication globally.
This slides present a knowledge of computer, memory, programming languages etc. That is required before learning C programming language.
http://www.learnbywatch.com
This chapter introduces key concepts related to computers, programming languages, and Java. It describes the basic parts of a computer and how they work together. It outlines the evolution of operating systems and different models of computing. It also discusses the history and characteristics of various programming languages like Java, C++, and FORTRAN. Additionally, it introduces object-oriented programming concepts like classes, objects, and design patterns. Finally, it provides an overview of the structure of a typical Java development environment.
Introduction to C language
C is a general-purpose programming language that is extremely popular, simple, and flexible to use. It is a structured programming language that is machine-independent and extensively used to write various applications, Operating Systems like Windows, and many other complex programs like Oracle database, Git, Python interpreter, and more.
The document provides an outline of topics for an introduction to computers and C++ programming. It covers the history of computers and operating systems, from early batch processing to modern distributed computing. It also discusses different types of computer languages at different levels of abstraction, from machine language closest to hardware to high-level languages like C++.
Computers can perform calculations and logical decisions millions to billions of times faster than humans. They operate based on programs which are sets of instructions, and have hardware components like processing units and memory as well as software programs. Common computer systems have units for input, output, memory, processing, and storage. Operating systems were developed to make computers more convenient to use and allow for multiprogramming and timesharing. Personal, distributed, and client/server computing expanded how computers are used. Programming languages have evolved from low-level machine languages to high-level languages like Java which are easier for humans to read and write.
This document provides information about a C++ programming course, including:
- Details about lectures, assignments, exams, grading, and policies
- An overview of computer languages from machine language to high-level languages like C++
- A brief history of C and C++ and their uses
- Examples of simple C++ programs that print text, get user input, perform calculations, and use conditional statements
The carbon cycle plays an important role in regulating carbon levels on Earth. As humans cut down more trees and burn fossil fuels, carbon dioxide levels increase in the atmosphere, exacerbating global warming. The carbon cycle involves carbon moving from the atmosphere to plants through photosynthesis, then to animals that eat plants, and eventually back to the atmosphere through respiration and decomposition. Maintaining the balance of the carbon cycle is critical for sustaining the food chain and regulating carbon levels in oceans, forests, and the atmosphere.
The document discusses the Downs Process for extracting sodium through the electrolysis of molten sodium chloride, where sodium ions are reduced to sodium atoms at the cathode and chlorine gas is produced at the anode. It also describes how sodium hydroxide is produced through the electrolysis of sodium chloride solutions, and lists some common uses of sodium and sodium hydroxide such as in soap production, as a drain cleaner, and for lighting.
Soaps are made through saponification, the process of reacting fats or oils with alkalis. They are cheap and biodegradable but do not work well in hard water which causes insoluble scum. Detergents are made through chemical processes using petroleum products or natural esters reacted with alkalis. They contain surfactants, phosphates, and other additives. Detergents are more effective than soaps for hard water, but many varieties are non-biodegradable and can cause environmental harm. Both products have advantages like low costs but also disadvantages like limited cleaning power or environmental impacts.
This document discusses different types of nitrogen fertilizers including organic and inorganic varieties. Organic nitrogen is slow-acting but supplies nitrogen for longer. Inorganic nitrogen exists as ammonium or nitrate, with ammonium bonding tightly to soil and nitrate being quickly absorbed but also leached. The document outlines nitrate, ammonium, and combined nitrate/ammonium inorganic fertilizers and amide organic fertilizers. It also discusses slow-release fertilizers and the nitrogen cycle. Benefits of fertilizers include maintaining soil nitrogen levels for strong plant growth, though overuse can harm plants or contaminate water supplies.
Chlorine is produced industrially through the electrolysis of sodium chloride brine. There are two main methods: mercury cell electrolysis and membrane cell electrolysis. Mercury cell electrolysis was historically used and involves liquid mercury and sodium amalgamation but consumes large amounts of energy. Membrane cell electrolysis uses a semi-permeable membrane to separate the anode and cathode compartments, producing chlorine gas and sodium hydroxide more efficiently. Chlorine has various industrial and medical uses including water treatment, bleaching, and antiseptic applications.
The document describes the process for extracting aluminum from bauxite ore. It involves crushing and grinding the bauxite, mixing it with a caustic soda solution in digesters, cooling the slurry, settling out the impurities, precipitating out the aluminum hydroxide, and calcining it to remove water. The aluminum hydroxide is then smelted using the Hall-Heroult process, which involves dissolving alumina in a molten cryolite bath using an electric current passing between carbon anodes and cathodes to produce molten aluminum.
Sulphuric acid is a colorless, viscous liquid that is highly corrosive. It is produced via the contact process, which involves burning sulfur and reacting the sulfur dioxide with a vanadium catalyst at high temperature to produce sulfur trioxide, which is then dissolved in sulfuric acid. Sulphuric acid is non-flammable but releases toxic fumes when heated and its corrosiveness can cause irritation upon short-term exposure. It has a variety of industrial uses such as in fertilizer, rubber, and oil production.
This document discusses C++ references and reference parameters. It explains that call by value passes a copy of the data to a function, while call by reference allows the function to directly access and modify the original data. A reference is an alias for an argument and is declared using an ampersand. The document provides an example program that demonstrates the difference between call by value and call by reference using references.
This document discusses the C++ preprocessor. It describes preprocessor directives like #include, #define, and #ifdef which are used to include files, define macros and symbolic constants, and conditionally compile code. It explains how the preprocessor works before compilation to perform text substitution and control program compilation. Specific directives and operators like #error, #line, and # and ## are also covered.
This document summarizes the contents of Chapter 12 from a textbook on data structures. The chapter covers dynamic data structures like linked lists, stacks, and queues that allow for insertions and removals. It discusses self-referential structures using pointers to link nodes together into different data structures. Specific data structures covered include linked lists, which connect nodes via pointer links, stacks which only allow insertions and removals from one end, and queues which allow insertions at the back and removals from the front. The chapter also discusses dynamic memory allocation using functions like malloc and free to dynamically allocate and free memory for linked data structures. Sample code is provided to demonstrate creating and manipulating each of these common linked data structures.
This document discusses C structures, unions, bit manipulations, and enumerations. It covers defining and initializing structures, accessing structure members, passing structures to functions, the typedef keyword, and an example program for simulating card shuffling and dealing using structures. Unions are defined as containing one data member at a time to conserve storage. Bitwise operators for manipulating bits are also introduced.
This chapter discusses formatted input/output in C using printf and scanf. It covers:
- Streams for input/output
- Formatting output with printf, including printing integers, floats, strings, and other data types
- Using field widths, precisions, and flags to control formatting
- Formatting input with scanf
The key goals are to learn how to use precise output formatting with printf and input formatting with scanf.
The document discusses functions for handling characters and strings in C. It describes character handling functions in the ctype.h library for testing and manipulating characters. It also describes string conversion functions in the stdlib.h library for converting between strings and integer/floating point values. Examples are provided to demonstrate using functions like isdigit(), isalpha(), atoi(), atof() and others.
The document is a chapter about arrays from a programming textbook. It discusses what arrays are, how to declare and initialize arrays, examples of using arrays, passing arrays to functions, sorting arrays, and searching arrays. The chapter contains code examples to demonstrate array concepts like initializing arrays, accessing array elements, and using arrays in programs.
This document discusses control structures in C programming, including repetition statements. It introduces the for and do-while repetition statements, the switch multiple selection statement, and the break and continue program control statements. The key aspects of the for statement are explained, including its initialization, loop continuation test, and increment components. Examples are provided to illustrate counter-controlled repetition using while and for loops.
This document provides an overview of introductory C programming concepts including writing simple programs, using input/output statements, understanding fundamental data types and memory concepts, performing arithmetic operations, and making simple decisions using relational operators. It presents several short example programs to demonstrate key C programming elements like defining variables, accepting user input, performing calculations, and conditional output based on equality comparisons. The document is intended to teach basic C syntax, structures, and programming techniques to newcomers of the language.
This document discusses Java multimedia capabilities for images, audio, and animation. It outlines topics including loading and displaying images, scaling images, animating a series of images, loading and playing audio clips, and issues with animation. Code examples are provided to demonstrate loading an image and scaling it, loading an audio clip and playing it, and animating a series of images.
1. 1
Chapter 1 Introduction to Computers
and C++ Programming
Outline
1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Evolution of Operating Systems
1.5 Personal Computing, Distributed Computing and Client/Server
Computing
1.6 Machine Languages, Assembly Languages and High-level
Languages
1.7 The History of C
1.8 The C Standard Library
1.9 The Key Software Trend: Object Technology
1.10 C++ and C++ How to Program
1.11 Java and Java How to Program
1.12 Other High-level Languages
1.13 Structured Programming
1.14 The Basics of a typical C Program Development Environment
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
2. 2
Chapter 1 Introduction to Computers
and C++ Programming
Outline
1.15 Hardware Trends
1.16 History of the Internet
1.17 History of the World Wide Web
1.18 General Notes About C and this Book
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
3. 3
Objectives
In this chapter, you will learn:
To understand basic computer concepts.
To become familiar with different types of programming
languages.
To become familiar with the history of the C programming
language.
To become aware of the C standard library.
To understand the elements of a typical C program development
environment.
To appreciate why it is important to learn C in a first programming
course.
To appreciate why C provides a foundation for further study of
programming languages in general and of C++ and Java in
particular.
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
4. 4
1.1 Introduction
We will learn
The C programming language
Structured programming and proper programming techniques
This book also covers
C++
Chapter 15 23 introduce the C++ programming language
Java
Chapters 24 30 introduce the Java programming language
This course is appropriate for
Technically oriented people with little or no programming
experience
Experienced programmers who want a deep and rigorous
treatment of the language
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
5. 5
1.2 What is a Computer?
Computer
Device capable of performing computations and making
logical decisions
Computers process data under the control of sets of
instructions called computer programs
Hardware
Various devices comprising a computer
Keyboard, screen, mouse, disks, memory, CD-ROM, and
processing units
Software
Programs that run on a computer
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
6. 6
1.3 Computer Organization
Six logical units in every computer:
1. Input unit
Obtains information from input devices (keyboard, mouse)
1. Output unit
Outputs information (to screen, to printer, to control other
devices)
1. Memory unit
Rapid access, low capacity, stores input information
1. Arithmetic and logic unit (ALU)
Performs arithmetic calculations and logic decisions
1. Central processing unit (CPU)
Supervises and coordinates the other sections of the
computer
1. Secondary storage unit
Cheap, long-term, high-capacity storage
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
Stores inactive programs
7. 7
1.4 Evolution of Operating Systems
Batch processing
Do only one job or task at a time
Operating systems
Manage transitions between jobs
Increased throughput
Amount of work computers process
Multiprogramming
Computer resources are shared by many jobs or tasks
Timesharing
Computer runs a small portion of one users job then moves
on to service the next user
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
8. 8
1.5 Personal Computing, Distributed
Computing, and Client/Server Computing
Personal computers
Economical enough for individual
Distributed computing
Computing distributed over networks
Client/server computing
Sharing of information across computer networks between
file servers and clients (personal computers)
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
9. 9
1.6 Machine Languages, Assembly
Languages, and High-level Languages
Three types of programming languages
1. Machine languages
Strings of numbers giving machine specific instructions
Example:
+1300042774
+1400593419
+1200274027
2. Assembly languages
English-like abbreviations representing elementary computer
operations (translated via assemblers)
Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
10. 10
1.6 Machine Languages, Assembly
Languages, and High-level Languages
Three types of programming languages (continued)
3. High-level languages
Codes similar to everyday English
Use mathematical notations (translated via compilers)
Example:
grossPay = basePay + overTimePay
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
11. 11
1.7 History of C
C
Evolved by Ritchie from two previous programming
languages, BCPL and B
Used to develop UNIX
Used to write modern operating systems
Hardware independent (portable)
By late 1970's C had evolved to "Traditional C"
Standardization
Many slight variations of C existed, and were incompatible
Committee formed to create a "unambiguous, machine-
independent" definition
Standard created in 1989, updated in 1999
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
12. 12
1.8 The C Standard Library
C programs consist of pieces/modules called
functions
A programmer can create his own functions
Advantage: the programmer knows exactly how it works
Disadvantage: time consuming
Programmers will often use the C library functions
Use these as building blocks
Avoid re-inventing the wheel
If a premade function exists, generally best to use it rather than
write your own
Library functions carefully written, efficient, and portable
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
13. 13
1.9 The Key Software Trend: Object
Technology
Objects
Reusable software components that model items in the real
world
Meaningful software units
Date objects, time objects, paycheck objects, invoice objects,
audio objects, video objects, file objects, record objects, etc.
Any noun can be represented as an object
Very reusable
More understandable, better organized, and easier to
maintain than procedural programming
Favor modularity
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
14. 14
1.10 C++ and C++ How to Program
C++
Superset of C developed by Bjarne Stroustrup at Bell Labs
"Spruces up" C, and provides object-oriented capabilities
Object-oriented design very powerful
10 to 100 fold increase in productivity
Dominant language in industry and academia
Learning C++
Because C++ includes C, some feel it is best to master C,
then learn C++
Starting in Chapter 15, we begin our introduction to C++
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
15. 15
1.11 Java and Java How to Program
Java is used to
Create Web pages with dynamic and interactive content
Develop large-scale enterprise applications
Enhance the functionality of Web servers
Provide applications for consumer devices (such as cell
phones, pagers and personal digital assistants)
Java How to Program
Closely followed the development of Java by Sun
Teaches first-year programming students the essentials of
graphics, images, animation, audio, video, database,
networking, multithreading and collaborative computing
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
16. 16
1.12 Other High-level Languages
Other high-level languages
FORTRAN
Used for scientific and engineering applications
COBOL
Used to manipulate large amounts of data
Pascal
Intended for academic use
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
17. 17
1.13 Structured Programming
Structured programming
Disciplined approach to writing programs
Clear, easy to test and debug and easy to modify
Multitasking
Specifying that many activities run in parallel
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
18. 18
1.14 Basics of a Typical C Program
Development Environment
Program is created in
Phases of C++ Programs: Editor Disk
the editor and stored
on disk.
Preprocessor program
1. Edit Preprocessor Disk processes the code.
Compiler creates
2. Preprocess Compiler Disk object code and stores
it on disk.
3. Compile Linker Disk Linker links the object
code with the libraries
Primary Memory
4. Link Loader
Loader puts program
5. Load Disk .
.
.
in memory.
.
.
.
6. Execute Primary Memory
CPU takes each
CPU instruction and
executes it, possibly
storing new data
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
..
values as the program
.
.
.
.
executes.
19. 19
1.15 Hardware Trends
Every year or two the following approximately
double:
Amount of memory in which to execute programs
Amount of secondary storage (such as disk storage)
Used to hold programs and data over the longer term
Processor speeds
The speeds at which computers execute their programs
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
20. 20
1.16 History of the Internet
The Internet enables
Quick and easy communication via e-mail
International networking of computers
Packet switching
The transfer of digital data via small packets
Allows multiple users to send and receive data
simultaneously
No centralized control
If one part of the Internet fails, other parts can still operate
TCP/IP
Bandwidth
Information carrying capacity of communications lines
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
21. 21
1.17 History of the World Wide Web
World Wide Web
Locate and view multimedia-based documents on almost any
subject
Makes information instantly and conveniently accessible
worldwide
Possible for individuals and small businesses to get
worldwide exposure
Changing the way business is done
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.
22. 22
1.18 General Notes About C
and This Book
Program clarity
Programs that are convoluted are difficult to read,
understand, and modify
C is a portable language
Programs can run on many different computers
However, portability is an elusive goal
We will do a careful walkthrough of C
Some details and subtleties are not covered
If you need additional technical details
Read the C standard document
Read the book by Kernigan and Ritchie
息 Copyright 19922004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved.