Class Notes for Object Oriented Programming and Design Patterns
- Fourth Edition by Steven F. Lott and Dusty Phillips
In order to learn coding, it's very important to actually type code on your own from scratch and NOT copy paste! You can run provided cells to see the output, follow along and learn from it. However, it's very important that you either start a new notebook or add cells and write your own code from scratch to practice the concepts covered with many similar examples and solve the exercises provided for self assessment.
You can launch an interactive session of this project using online Binder service: or Google Colab. Each chapter, where applicable, provides to simply click and run the notebook in Google's Colab environment.
To run these notebooks interactively and save your work locally, you need [Python 3][https://www.python.org/] and Jupyter Notebook -- an interactive web-based editor that allows you to create and share documents that contain live code and data. Anaconda or Miniconda is the recommended way to install Python and other packages on all modern platforms.
Anaconda or Miniconda has Python 3 and many other packages that you can easily install on any platform (Windows, Linux, and Mac). First, install Anaconda: http://docs.continuum.io/anaconda/install/ or Miniconda https://conda.io/docs/user-guide/install/index.html for Python 3.
After installing anaconda or miniconda, open a terminal or cmd prompt and run the following commands:
conda update conda
conda env list # list current environments
conda env remove -n <environment_name> # remove existing environment
conda create -n oop python=3.10 # create a new virtual environment named py
conda activate oop
conda install notebook # or
conda install -c conda-forge retrolab # uses notebook
conda install mypy # type checker
python -m pip install hypothesis # test data generator
- Python notebooks can be run natively in VS Code. Simply open the notebook file with extension .ipynb in VS Code and run each cell; add new cell, etc. right from VS Code.
Once Python 3 and Jupyter Notebook are installed, open a terminal change working directory using cd command to go into the folder where this repo is cloned and run the notebook from there. Use notebook or retro.
cd <directory where this repo is cloned>
jupyter notebook # or
jupyter retro
This will start a Jupyter session in your browser. Open any chapter and start coding...
Contributions are accepted via pull requests. You can also open issues on bugs, typos or any corrections and suggest improvements on the notebooks.