OOP Checklist: Difference between revisions
From charlesreid1
(Created page with "See Checklists This page contains a checklist for creating an abstract data type or data container. =Java= More "formal" abstract data types in Java typically conform t...") |
(→Java) |
||
| Line 20: | Line 20: | ||
=Python= | |||
Many of same principles/checklists hold for Python: | |||
* abstract classes and virtual methods | |||
* encapsulation (underscore for method names - knowing HOW to make things private) | |||
* iterables | |||
* generic types (well, okay... maybe not. ctypes?) | |||
=Flags= | |||
[[Category:ADT]] | [[Category:ADT]] | ||
{{CSFlag}} | |||
Revision as of 17:25, 18 June 2017
See Checklists
This page contains a checklist for creating an abstract data type or data container.
Java
More "formal" abstract data types in Java typically conform to the Collections interfaces. These can be quite extensive. On the other hand, less functional data containers can provide one-off solutions, but get in the way of reusability. The following checklist covers functionality/features that data containers should provide, ranging from less complicated to more complicated.
- Java/Abstract Class - Data containers should probably make use of abstract classes. This can make code organization (finding which method is implemented in which child or parent class) a pain.
- Java/Interfaces - related to abstract classes, but not quite the same. Require that certain methods be implemented, but do not do anything further (whereas, virtual classes can actually implement a method.)
- Java/Encapsulation - Use private/public. Heuristics for private/public?
- Java/Iterable -Make the tree iterable. Provide an automated way of iterating over each node in the tree.
- Java/Generics - Use generic types whenever/wherever possible! (interfaces too.)
So, the ADT checklist boils down to:
- Abstract Classes and Interfaces
- Encapsulation
- Iterables
- Generics
Python
Many of same principles/checklists hold for Python:
- abstract classes and virtual methods
- encapsulation (underscore for method names - knowing HOW to make things private)
- iterables
- generic types (well, okay... maybe not. ctypes?)
Flags
| Computer Science notes on computer science topics on the wiki, for educational and learning purposes
Part of the 2017 CS Study Plan.
Python/Exceptions · Python/Assertions · Python/Decorators Python/Os (os module) · Python/Strings Python/Splat · Python/Iterators · Python/Generators Python/Comparators · Python/Lambdas
Builtin features of Java: Java/Exceptions · Java/Assertions · Java/Memory · Java/Interfaces Java/Generics · Java/Decorators · Java/Diamond Notation Java/Iterators · Java/Iterable · Iterators vs Iterable Java/Comparators · Java/Comparable · Comparators vs Comparable Java/Numeric · Java/TypeChecking · Java/Testing · Java/Timing · Java/Profiling Documentation: Javadocs · Java/Documentation Tools and functionality: Java/URLs · Java/CSV External libraries: Guava · Fastutil · Eclipse Collections OOP: OOP Checklist · Java/Abstract Class · Java/Encapsulation · Java/Generics
|
See also: