Operator() and [], Writing Tests, Bitwise Operations
Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=QCx-rnZ5CrI
We went over the operator() method, which lets you treat an object like a function, and the operator[] method, which lets you treat an object like an array
We then did a bit of lab time in which students had to collectively generate tests for the next homework assignment, during which a fair bit of disagreement over how to interpret the rules took place, which is actually a pretty realistic scenario
Finally we finished with the final data structure of the class, the int.
You can treat a 32-bit int like it is 32 booleans, and insert, search, and delete individual bits in it, which allows you to pack a lot more data into the same variables, and reduce your RAM usage, network traffic, hard drive space, and so forth.
Other Videos By Bill Kerney
2022-05-02 | Consciousness |
2022-04-29 | Tries Part II, Huffman Coding |
2022-04-29 | Python in 50 minutes |
2022-04-27 | Tries |
2022-04-27 | Set Theory: Different Sized Infinities; Brief intro to Python |
2022-04-26 | Quadtrees (Pt II), K-D Trees, BSP Trees, AABBs vs OBBs |
2022-04-25 | Composite Data Structures |
2022-04-25 | Symbolism and Semantics |
2022-04-23 | Shapes (Linear Algebra review), Bitwise Operations Part II, Vim Macros |
2022-04-22 | Sea Shanty Workshop |
2022-04-21 | Operator() and [], Writing Tests, Bitwise Operations |
2022-04-20 | Set Theory Part I |
2022-04-19 | Quadtrees in 30 minutes |
2022-04-18 | Inheritance Part VI, Constexpr, Inline |
2022-04-18 | Corporate Censorship + Qualifiers |
2022-04-08 | Inheritance Part V; Heaps |
2022-04-08 | Corporate Censorship |
2022-04-06 | C++ Inheritance Part IV: Sorting Vectors of Smart Pointers |
2022-04-06 | Midterm II Review |
2022-04-04 | Inheritance Part III - Virtual/Override/Final, Abstract Classes, Multiple Inheritance |
2022-04-04 | Is/Ought Problem, Naturalistic Fallacy, Beautiful Computer Science |
Tags:
csci 41
operator()
operator[]
c++
functors
TDD
bitwise operations
bitset
int