Chapter 14 Portfolio-Building Project, OOP
So far in your portfolio case study you’ve solved an analytical problem and made your code a bit more generalizable by using functions. Let’s go all the way and see if we can convert all the parts into a new class, you can call it whatever yiou like, e.g. IndianFood
.
Exercise 14.1 (Begin a new class)
Define a new class called, using an appropriate name, like IndianFood
.
Exercise 14.2 (Convert functions to methods) Convert each of the independent sections in the previous chapter to new
class methods
.
Exercise 14.3 (Call the class) Call the class methods progressively after defining the class. Your last method should be a
class method
that executes the entire protocol as described in the previous chapter.