View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

UC Milestone 2 - Case Page

Our work


Uploaded Image: P2-UML.gif


With the classes created and associated as shown above, you could see that we attempted to forecast as far as possible ahead to determine what objects we would need in P6 and P7. Basically only the following classes are used in our P2 implementation:

Setting up the buildings



Using the map provided at GT alumni it became necessary to design the layout of the map in order to meet our needs. This meant using the picture on the Alumni website to determine the coordinates relative to the map so that the buildings could be placed in the proper place. These coordinates had to be taken as fractions of 1 relative to the upper and lower left and right sides of the buildings(these represented the location of the four sides of the building loosely). These fractions were stored in the class "Building" as floats, along with the building's name and the image's URL. The buildings were initialized with this info by the class GTCampusMap and stored in a collection in class Map.

Setting up the display



For our building display, we used a SystemWindow to hold the entire display of the map. Inside the SystemWindow, we placed a SketchMorph which held an ImageForm containing the image of the map. On top of this SkecthMorph, the PluggableButtonMorphs were placed. These were drawn using the fractions stored in the buildings and the dimensions of the SystemWindow, allowing the SystemWindow to be resized without destroying the positioning and size of the buttons on the map. The buttons were colored a bright green in order to make them easily visible on the map, and an X was displayed in their center as well. These buttons represented the positions of the buildings that were stored on this map. When clicked, they would open up another smaller SystemWindow in the upper left corner of the Squeak window. This SystemWindow would display the image and name of the building that had been clicked. Whenever another building was clicked, this SystemWindow would be closed and another would be opened with the information of the clicked building. All of the responsibility for displaying these things were delegated to class MapDisplay2D, a subclass of the abstract class MapDisplay.

Setting up and running the Map



The job of setting up and running the map was delegated to class GTCampusMap. GTCampusMap was designed as an extension of MapDisplay2D and has the job of initializing the roads and buildings associated with the Georgia Tech Campus. This class contained methods that would be useful to both the 2D and 3D versions of this application, so that we would have maximum reuse of code in the future.




So what went right??



As far as what went right, the design concepts we used to build this project were done well enough that we were not forced to make any drastic changes to the design in later projects. Even though it was not always a requirement, all of our previous projects were able to maintain the functionality of the previous projects. Of course, the project itself supported all of the functionality required and also allowed the user a few extra abilities, such as resizability and the use of a SystemWindow to control the displaying of the map. We also used a map that provided a fairly accurate representation of the campus in relation to the real world.


But what went WRONG?!?!



Initially we had tried to use integer points to draw the Buildings on the map. This, however, did not prove to be a good way as it did not make resizing the window and the buttons an easy task. We moved from this idea to the idea of using fractions for the locations of the upperleft and lower right hand corners of the buildings. This, however, did not work terribly well as it became difficult to translate these fractions to something that could be drawn and displayed on the map. Thus we decided to store the fractions of the four "sides" of the buildings and use these to draw the buildings on the map.

In addition, we also forgot to do the part of the project that required us to do a text version of our UML describing our classes in detail. Just a future reminder to ALWAYS READ THE PROGRAM REQUIREMENTS.


If only I had more time...



With additional time and effort, a nice addition would have been to set up a dialogue box that allowed the user to specify the building for which he wished to see the information display. This box could be a panel on the right side of the user interface that had a small image of the building and it's name. If the user clicked on the building name/image it would open the building information window and highlight the building on the map. This way the user could either look up a building by name, or click on a building location for extra information.


Random thoughts









Link to this Page