Re: [Tutor] Another OO modeling question

2015-12-22 Thread jamie hu
* * 22.12.2015, 15:26, "Alan Gauld" : On 22/12/15 22:06, jamie hu wrote: * * I am trying to write down class and object definition for a Virtual Machine type. For example, I would like to create a Virtual Machine (

[Tutor] Another OO modeling question

2015-12-22 Thread jamie hu
* * I am trying to write down class and object definition for a Virtual Machine type. For example, I would like to create a Virtual Machine (object) that can have actions like launch, terminate, stop, add_disk, remove_disk etc.. * My confusion here is that VirtualMachine obj

Re: [Tutor] Another OO modeling question

2015-12-22 Thread Alan Gauld
On 22/12/15 23:47, jamie hu wrote: > Thanks for the reply Alan. If init code calls launch method then I > would have problems in looking up objects afterwards. In that case use the init to do the config then explicitly call the launch. > For example: > 1. First or initial calls to VirtualMachine(

Re: [Tutor] Another OO modeling question

2015-12-22 Thread Alan Gauld
On 22/12/15 22:06, jamie hu wrote: >* >* >I am trying to write down class and object definition for a Virtual >Machine type. For example, I would like to create a Virtual Machine >(object) that can have actions like launch, terminate, stop, add_disk, >remove_disk etc.. >