Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

design - How to model multiple inheritance objects in Java -


i've got following problem in little soccer manager game i'm writing. i've got classes person, player, coach, manager. person base class of other ones. problem player can coach and/or manager. adding more roles (e.g. groundkeeper) i'll more , more complex - so, how can implement efficiently? isn't there pattern that?

don't model role type of person. person should have collection of roles

public enum role {   player,   coach,   ref  }  public class player {   private final string name;   private collection<role> roles = new arraylist<role>();    public player(string name) {     this.name = name;   }    public void addrole(role role) {     this.roles.add(role);   }  } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -