{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chap2 - Chapter 2 Problem Solving Using C 1 Outline...

Info iconThis preview shows pages 1–18. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Chapter 2 Problem Solving Using C++
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Outline Introduction to C++ Programming Style Data Types Arithmetic Operations Variables and Declaration Statements
Background image of page 2
3 Modular Program: a program consisting of interrelated segments arranged in a logical and understandable form Easier to develop, correct, and modify than other kinds of programs Module: a small segment which is designed to perform a specific task A group of modules is used to construct a modular program Introduction to C++
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Introduction to C++ (continued) Figure 2.1 A well-designed program is built using modules.
Background image of page 4
5 Modules in C++ can be classes or functions Function: accepts an input and produces an output by processing the input in some fashion Class: contains both data and functions used to manipulate the data Introduction to C++ (continued)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Introduction to C++ (continued) Figure 2.2 A multiplying function.
Background image of page 6
7 Introduction to C++: The main() Function Overall structure of a C++ program contains one function named main() , called the driver function All other functions are invoked from main()
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon