Please enable JavaScript.
Coggle requires JavaScript to display documents.
(big 3, C++ Class Checklist), DPOSDMAHRS, big 5, uses of the const keyword…
big 3
-
-
assignment operator
handles
assignment(makes it a deep copy, not a shallow copy)
-
C++ Class Checklist
14 points
interface is complete
meaning it contains all the functions to perform the tasks at hand and future tasks that it could reasonably be expected to do based on the requirements of the application
-
-
-
data members are private
-
encapsulation
putting all of the data(variables) inside a single class/struct and limiting access through member functions
-
-
-
-
-
-
-
-
const-correct
if a function is not intended to modify the object it is being called on/applied to, declare it as const
if a formal parameter is not meant to be modifed, either pass it by value or by const reference
-
hings to consider when designing a class interface, rules should only be broken when necessary and thought through
DPOSDMAHRS
-
Robust
-
capacity of a computer system to handle the errors during execution and manage the incorrect input of data
-
-
-
-
-
-
-
-
big 5
-
optional
swap
copy-and-swap idiom
3 steps
- pass an object of the class youre working on by copy/value(instead of by reference like normal) to the assignment operator forcing it to call the copy constructor
- create a friend function named swap
- call the swap function within the assignment operator, forcing it to call the destructor implicity instead of having to use delete explicitly within the assignment operator
-
-
-
-
-
-
-
-
-
class vs struct
-
class
A class has all of its members private by default,
if you just want to organize data and keep things public without adding member functions, use a struct. If you have a complex interface, or private data and a complex interface, use a class
should always be used in lieu/in addition of assignment in the constructor body for initializing at least 2 kinds of data members
-
the data type has its own default constructor, like strings(std::string)
-
-
variable names should make sense to anyone
with knowledge of the application domain(what the application is designed to work for)
-
-
-
-
-
JDK
provides:
Includes the JRE, JVM, Javac, Jar, Javadoc
JAR
-
a single archive containing all the class files and auxilary resourcess needed for certain applets/applications
is a variety of zip file
zip files
good for 4 things
compression
advantages/disadvantages
reduced file size, decreased download time
requires extraction, increased time to load the program since it requires a decompressing operation
-
-
-
-
Java Archiver/Java archive tool, java archive file
-
-
java platform
-
is unique because it is a platform made purely of software that runs on top of other platforms such as
-
-
-
-
-