Programming in c++ Program Input and the Software Design Process Dale/eems/Headington
1 Program Input and the Software Design Process
Programming in C++ Chapter 4 Topics Input Statements to Read Values for a Program using >> and functions get, ignore, getline s Prompting for Interactive Input/Output Noninteractive Input/Output % Using Data Files for Input and Output s Input Failure Software Design Methodologies s Object-Oriented Design Principles Functional Decomposition Methodology
2 Chapter 4 Topics ❖Input Statements to Read Values for a Program using >>, and functions get, ignore, getline ❖Prompting for Interactive Input/Output ❖Noninteractive Input/Output ❖Using Data Files for Input and Output ❖Input Failure ❖Software Design Methodologies ❖Object-Oriented Design Principles ❖Functional Decomposition Methodology
Programming in C++ No l/o is built into C++ s a library provides input stream and output stream Keyboard executing Screen program istream ostream
3 No I/O is built into C++ ❖ a library provides input stream and output stream Keyboard executing Screen program istream ostream
Programming in C++ Keyboard and Screen I/o include <iostream> input data output data executing Keyboard Screen program cIn cout (of type istream) (of type ostream)
4 Keyboard and Screen I/O #include <iostream> cin (of type istream) cout (of type ostream) Keyboard Screen executing program input data output data
Programming in C++ <iostream> is header file &The header file iostream contains the definition of two data types: istream and ostream for a library that defines 3 objects an istream object named cin(keyboard an ostream object named cout(screen) an ostream object named cerr(screen)
5 <iostream> is header file ❖The header file iostream contains the definition of two data types:istream and ostream ❖for a library that defines 3 objects an istream object named cin (keyboard) an ostream object named cout (screen) an ostream object named cerr (screen)