This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:cprog:fall2021:projects:oop0 [2021/10/28 03:44] – [Classes] hhemler | notes:cprog:fall2021:projects:oop0 [2021/10/28 03:51] (current) – [Backstory of C++ Programming language] hhemler | ||
---|---|---|---|
Line 53: | Line 53: | ||
Classes make it easier to work with data by providing users with the ability to create constructors, | Classes make it easier to work with data by providing users with the ability to create constructors, | ||
- | ==Methods== | + | ==Member Data== |
- | Methods are functions that belong to a class. | + | In C++, you can define data inside of classes for the sake of using them with member functions. Access specifiers can be used to determine where these variables can be called from, and which functions can call them. (This is further described down below) |
+ | |||
+ | ==Methods | ||
+ | Methods are functions that belong to a class. | ||
==Constructors== | ==Constructors== | ||
Line 98: | Line 101: | ||
====Objects==== | ====Objects==== | ||
- | Instances of a class. Creating an object of a class works almost exactly like initializing any fundamental type; simply specify the the type name, followed by your variable' | + | Instances of a class. Creating an object of a class works almost exactly like initializing any fundamental type; simply specify the the type name, followed by your variable' |
=====Program===== | =====Program===== | ||
Write a program that creates one or more of the following classes: | Write a program that creates one or more of the following classes: |