Terrence Brannon wrote: (Mon Apr 16 22:30:47 HKT 2007) > The examples are fine. One thing that stuck out in my mind is > that the array billrate is a rank1 as opposed to rank 2 array. > You might think that an employee has a different billing rate > depending on which client he is servicing. But if that becomes > the case, then hours_worked becomes rank 3: > hours_worked[nemp][nclients][31]
Extending the model in this manner makes for an interesting intermediate excercise. It would test one's ability to handle rank properly, and I anticipate that it would underscore a strength of J. > > Also emp_client should be indexed by nclients, not nemp. You > must have an employee for every client, but not a client for > every employee. And I would rename emp_client as emp4client > because that is what it is: the employee for a client. You need not have an employee for any given client; either set can be empty. The emp_client array is a simplification, and switching the direction of referencing (from a list with employee denoted by position on the axis and client by the scalar, to a list with client denoted on the axis and employee by the scalar) will not fix the flaws in this simplistic approach. Given the context in which it occurs, it is fine. A data model with many-to-many relationship between employees and clients would distract from the fundamentals Henry Rich focuses on in that chapter. Tracy Harms __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
