Exercise 47

Basic Object-Oriented Analysis and Design

I’m going to describe a process to use when you want to build something using Python, specifically with object-oriented programming (OOP). What I mean by a “process” is that I’ll give you a set of steps that you do in order but that you aren’t meant to be a slave to or that will totally always work for every problem. They are just a good starting point for many programming problems and shouldn’t be considered the only way to solve these types of problems. This process is just one way to do it that you can follow.

The process is as follows:

  1. Write or draw about the problem

  2. Extract key concepts from Step #1 and research them

  3. Create a class hierarchy and object map for the concepts

  4. Code the ...

Get Learn Python the Hard Way: A Deceptively Simple Introduction to the Terrifyingly Beautiful World of Computers and Data Science, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.