Skip main navigation

Introduction to classes

Introduction to classes.
(dinging) (mouse clicking) When you go to the shops to do your weekly grocery shopping, usually you have a shopping list or at least some idea of what you want to get. These items can then be categorised into the functions they perform, for example, you could at least split items into perishables and non-perishables. After this, you can categorise the items even further. There are perishables that are processed and perishables that are not processed foods. And likewise, in these categories, there are particular attributes that perishable and non-perishable goods have. For example, some non-perishable goods, such as toilet paper are used in the toilet primarily. Dish washing detergent is primarily used in the kitchen.
This is exactly the same concept that classes try to teach. Classes are essentially a blueprint of a general category of items that can be specified in further detail or separated into subcategories. If you’re trying to solve a problem, it might actually be best to think in classes. For example, for your shopping predicament, you know you need to get several items but you’re not sure in which order you need to get these items as they’re located in separate ends of the store. Splitting these items into their respective classes and subclasses can provide you with the benefit of visiting areas in the shop in a specific order based on the class of the items you wish to buy.
This article is from the free online

Programming Essentials with Python: Matplotlib and Seaborn

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education