[comp.lang.smalltalk] Defining objects

uucigj@swbatl.UUCP (3531) (08/17/89)

	I have been doing a lot of reading on OOP and have a lot of definitions
	in my head.  Now, when I try to apply what I have learned there seems
	to be some glue missing.  One main problem that I have when trying to
	produce small examples is where to draw the line when defining objects.
	I am trying to go by the method of modeling the objects with real world
	items but I things don't seem as clear as reality. 

	This is a first attempt at a OOP solution to a problem.

	Problem: Shortest path between to cites
	Example: a road map of a state.

	Objects defined:
	connections - 	Intersection point (normally a city with highways coming
					in and out).  
					
	cities -		has points, with distances to each point  (might have
					direction north, south etc)

	trip -			keeps track of connections, distances, total distance
					(in the future - time, gas consumption etc).

	Question:
	1) Is it necessary to have an object specified for the road
	connecting the points?  (Say to give a description of what kind of road
	connects the two points. ie, toll, 4 lane, 2 lane etc).

	2) Should there be a connections object?

	3) Should the methods be defined along with picking out objects?

	4) Sometimes methods seem an awful lot like objects themselves.  When
	this happens should they become objects?

	There is more where these came from, I would like to continue by Email
	unless there are more like me out there.

	I have available to use the Smalltalk/V 286 product that I would like
	to use if that may be of any interest.  Also, I learn by example better
	than by theory (kind of like to get my hands dirty and burned a bit).

	Any help would be appreciated.

      Gregg Jensen
   ---------------------------------------------------------------------- 
    These opinions are my own and do not necessarily reflect my companies.
      Southwestern Bell Telephone
      Send E-MAIL to the following address...
               cs.bellcore.com!tness7!sw1e!uucigj
   ----------------------------------------------------------------------