Notes From CS Undergrad Courses FSU
This project is maintained by awa03
For More info on the ways computers work look at: [[What is a Computer?]]
Types inside of functional languages are immutable. This is not the case for object oriented languages, this can be seen through
C++
void FlipFlop(int &x, int &y){
int temp= x;
x = y;
y = temp;
};`
This allows for variable mutation, aka when variables data changes.
Classes are C++ code segments that act as templates for objects. These objects are instances of a class.
Classes encapsulate two concepts: - State: Color, Owner, Name - Behavior: Sit, Bark, Wag Tail
Each are independant from one another. Therefore changing the information within one dog will not change the information for all dogs.
Structs are state only, however this line between structs and classes has blurred in recent years.
[[Computer Science Notes/COP 3330/Index]]