Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
7 Cards in this Set
- Front
- Back
What is a class?
|
A data type that encapsulates both the state of an object and methods that can be performed on the object
|
|
What is an object?
|
An instance of a class
|
|
What makes an interface good?
|
- Simplified view of a component
- Expressed in the vocabulary of the user |
|
What is encapsulation?
|
Separating a class' interface from its implementation and making only the interface public
|
|
How does C++ help with the safety vs. usability tradeoff?
|
- In C, static variables helped with safety, but didn't allow for multiple instances
- In C, struct's supportm ultiple instances, but don't prevent access - C++ classes provide safety AND allow multiple instances |
|
Does encapsulation help with security?
|
No, it just prevents software from depending on something that they shouldn't depend on.
|
|
What are the differences between a struct and a class?
|
- Members of struct are are public by default, members of class are private by default
- Otherwise functionally equivalent - struct typically has very few members, only public data - class typically only allows access via methods, with only private data |