interviewer told me that design a model for car sharing which use same 
structure as google groups i designed the below design but i have some 
doubts mention as comment pls make them clear.
Class POI// Point of interest 
{
Parm:
double Lat,Lon;
}

Class Route
{
Parm:
POI start,end;
Time start,end;
int type=2;// type of route define purpose of adding route its value could 
be 0,1,2.
// 0 defines that only for search
// 1 defines that only for share
// 2 defines that  for both share & search

METHODS:
Route(POI,POI,Time,Time);
}


Class Member
{
Parm:
int ID,Age,RegisteredGroupID[]// group id is array contains the id of those 
groups which are registered by that member;
String Name;
POI POIList[];
Route RouteList[];

METHODS:
POI AddPOI(), void RemovePOI(POI), Route CreateRoute(POIList), void 
DeleteRoute(Route), Route[] searchRoute(Route), void RegisterGroup(GroupID)
void CreateGroup(member);
}

Class Admin:: Member
{
Parm: 
int OwnedGroupsID[];

METHODS:

void AddMember(Group,Member)// I HAVE A DOUBT ABOUT THIS FUNCTIONS. IS THIS 
FUNCTION SHOULD BE IN GROUP CLASS OR ADMIN CLASS? DO COMMENTS
void RemoveMeber(Group,Member)//I HAVE A DOUBT ABOUT THIS FUNCTIONS. IS 
THIS FUNCTION SHOULD BE IN GROUP CLASS OR ADMIN CLASS? DO COMMENTS
void RemoveGroup(Group);
void ListMembers()
}

Class Group
{
Parm:
Admin admin;
Member MemberList[];

METHODS:
Group(Admin);
}

// Add the missing components And Give feedback.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/relsDl__14kJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to