Reputation: 31272
I would like to translate the attached UML to Pseudocode. I have the following class and interface headers below.
I would like to know
1) if this is correct?
2) what is the relation between Store and Manager and Store and StoreEmployee? I have Manager and StoreEmployee as private fields in Store. Is this correct? if yes, then why they are not included in attributes
3)What is the relation between store and Store Test ?
4) I have Employee as interface while PayRoll Record as concrete class? Is this correct? both have broken line arrow connection?
public interface Employee { }
public class Manager implements Employee{ }
public class StoreEmployee implements Employee{ }
public class SalesAssociate extends StoreEmployee { }
public class PayrollRecord { } //
public class Store extends PayrollRecord { } // does it have Manager and StoreEmployee as private fields
public class StoreTest { } //does it have Store as private field
Upvotes: 0
Views: 2349
Reputation: 437
Here are some quick answers that don't fulfil your questions perfectly, while still hopefully point you in the right direction.
Employee
implies inherits from, where the PayRollRecord
is just a general usage arrow.For these, the previous answers should help you answer your questions here. :)
public class Store extends PayrollRecord { } // does it have Manager and StoreEmployee as private fields
public class StoreTest { } //does it have Store as private field
Upvotes: 1