Your example lacks data. An object is the combination of data and code manipulating the data with some syntactic sugar on top
Data will indeed be necessary. But data in OOP are interesting: they are not supposed to be directly visible. They are like the method body: there is one, but it is not important what it is. So if we add data, it will be that:
class Aaaa (some data) method bbbb(): (some code)
Data will indeed be necessary. But data in OOP are interesting: they are not supposed to be directly visible. They are like the method body: there is one, but it is not important what it is. So if we add data, it will be that:
Do you think this is an object now?