mardi 11 février 2020

Driver and car class: where would I write drive() method?

Here's a model in reference to my question: O-O model

When implementing the code, I imagine myself writing a class for "Driver", and another for "Car". If I were to write a method (drive car, operate wipers, apply breaks, etc), is it recommended that I write them in the Driver class file or Car file?

Aucun commentaire:

Enregistrer un commentaire