Lecture1 - Algorithms in Systems Engineering IE170 Lecture...

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

View Full Document Right Arrow Icon
Algorithms in Systems Engineering IE170 Lecture 1 Dr. Ted Ralphs
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
IE170 Lecture 1 1 References for Today’s Lecture Required reading CLRS Chapter 10 References R. Sedgewick, Algorithms in C++ (Third Edition), 1998.
Background image of page 2
IE170 Lecture 1 2 Data Types in C++ A data type is a set of data values and a set of operations that can be performed on those values. Data types are a mechanism by which C++ and other object-oriented languages allow programmers to define and implement data structures . Most of the data types you have probably encountered so far are the C++ built-in data types. What are the operations we perform on these data types?
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
IE170 Lecture 1 3 C++ Classes In C++ , classes are used to build new data types. A class is composed of The data members are the values. The member functions are the operations to be performed on these values. There are also constructors and destructors , by which objects of the specified types are created and destroyed.
Background image of page 4
IE170 Lecture 1 4 C++ Classes Ideally, we would like to separate the definition of the type from the implementation . Defining a type consists of specifying the data that needs to be stored and the operations that need to be performed. In C++ , the definition is contained in a header file that must be included in any source file that uses the data type. The implementation specifies the method by which these operations should actually be performed. What is the main advantage of separating the definition from the implementation?
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
IE170 Lecture 1 5 The Interface The interface defines the way in which clients can actually use the data
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 18

Lecture1 - Algorithms in Systems Engineering IE170 Lecture...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online