- Why do we need classes, why can’t we just use structs?
- Classes hold data but also provide functions that work with the data too. Classes and structs are essentially the same, but classes are public
- What are methods?
- Methods are also known as member functions. Methods are functions defined inside of a class for simplicity; however, they can also be define outside of it’s class too
- How would you define a class?
- class Class{
public;
//your variables
};
- What is an object?
- Objects are instances of class. They hold the data variables declared in the class.