PolyParkTrack

Introduction

This is the prototype of how PolyParkTrack should behave. For this prototype, the application reads in the JSON file containing required information for each parking structure in Cal Poly campus. Then the GUI displays the number of the parking spot in each Parking Structure on cal poly are shown on the right with the format of Parking Structure #: #. The first # referring to the parking structure number, the second # is referring to the number of available parking spots in that parking structure.

Text format

Next to the field containing the number of parking spots available in each parking structure, is a static cal poly map that allows users to pick the location he/she want to start. After picking the location, the user is able to input on the text field the car type he/she wants to find where 1: Compact, 2:Electric, 3: Handicap, 4: Normal. Then the user is able to press "find the spot" button on the right of the screen. After pressing "find the spot" button, a bunch of text on the button of the screen will be shown. The bottom text displays the information containing the nearest parking structure with the closest parking spot that user has picked. Under the parking spot information, are the text containing the distance and time takes to reach that parking spot. StartScreen

Getting Started

  1. This is the starting screen of the PolyParkTrack.

    • Left side of the screen displays a number of available parking spots in each parking structure.
    • Next to the text is the static Cal Poly Campus map.
    • Text fields and "find the spot" button are under the static map.
    • And text displaying "Welcome to PolyParkTrack" is shown on the bottom of the screen.
      • StartScreen
  2. Then you are able to pick a starting location in the static map on the right.

    • A transparent circle will be shown on the map if you pick a valid location in the static map.
    • Otherwise, nothing should be happening.
      • PickLocation
    • If you press the "find the spot" without a starting location, the application will complain about it and display "Pick a starting location".
      • NoStartingLocaiton
  3. After picking the location, you are able to enter the parking type for your car, 1: Compact, 2: Electric, 3: Handicap, 4: Normal as shown below

    • This field is not required to be filled to do find the nearest parking spot, it will be defaulted to be Normal.
    • String or numbers are both valid for car type field
      • 1 or Compact for Compact Car parking spot
      • 2 or Electric for Electric Car Parking spot
      • 3 or Handicap for Handicap Parking spot
      • 4 or Normal for Normal Parking Spot
        • PickCarType1
        • PickElectricCarType
    • The Message "Invalid Car Type" will display if you pick any type other than number and string referring to the car type
      • InvalidCarType
  4. The last step will be pressing the "find the spot" after you have to pick the starting location and entered a valid car type.

    • The message will display the location of the nearest parking spot that you try to find and the distance and time it takes to get to the destination.
      • PrintText
      • FindELectricPark

Implementation

  1. Breath-First Search to find the distance between User picked location and nearest parking structure
  2. LinkedList as a queue in Breath-First Search to find the distance
  3. Observable pattern
    • User is the subject
      • If the user changes the location or changes the car type, then the observer will be notified.
    • Calculation is the Observer
      • If the user changes the location or car type, then calculation object will find the new nearest parking type available and display it on the screen.

UML class diagram

UML class1

Observer Pattern

Architecture

Useful Features

Built With