Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cellphone Classes Ven Tadipatri, Matt Hatoun, Jennifer Wong, Michael Leen, Syung Youn Nam.

Similar presentations


Presentation on theme: "Cellphone Classes Ven Tadipatri, Matt Hatoun, Jennifer Wong, Michael Leen, Syung Youn Nam."— Presentation transcript:

1 Cellphone Classes Ven Tadipatri, Matt Hatoun, Jennifer Wong, Michael Leen, Syung Youn Nam

2 Overview The cellphone needs to keep a queue of assignments received from the server, and continuously check for GPS info to send Hence, we have 2 threads running There’s a controller for both threads, and the user interface for displaying info. Also, there are some configuration settings to take care of--done by an external applet

3 Class Diagram Controller (extends midlet) GPS Server Connection Assignment Queue User Interface Form Assignment Parser Server Backup File Instantiates Accesses DataPack

4 Controller public method: public void InstantiateClasses() public void Start_GPS() public void Start_server() public int ReadConfig(String config_file_loc) Member variables: Server controller

5 Assignment Queue public method: public void Assignment_Queue(String backup_file_loc) public Assignment getNext() public void AddAssignmentList(List Assignment) public void AddAssignment(Assignment) private method: private void Write_to_File(backup_file_loc) private void clear_file(String backup_file_loc) Member variables: List listeners String backup

6 Assignment public method: Assignment(int, String, String, int, boolean, time) public String getDropOff() public String getPickUp() public int num_pass() public boolean callback() Time rec_time() member variables: int Assign_num String pickup String dropoff int num_people Time t boolean call_back

7 GPS Public Method GPS(int) void run() DataPack getPacket() Member Variables DataPack myPacket int myfreq DataPack Public Method DataPack(string, string, string) String getLatitude() String getLongitude() String getTime() Member Variables String myLat, myLong, myTime

8 Server public: ServerConnection(GPS, AssignmentQueue, String, int, bool); ServerConnection(AssignmentQueue, String, int, bool); void setParser (Parser ); void setGPS (GPS ); void setQueue (AssignmentQueue ); void run(); private: connectionLoop() Member Variables: Parser m_Parser; GPS m_gps; AssignmentQueue m_q; String m_serverURL; int m_waittime; bool m_getAssignments

9 Parser public methods: Parser () boolean isValid (String s) List parse (String s) private methods: NONE member variables: NONE

10 User_Interface public methods: UserInterface (AssignmentQueue) void QueueChanged () private methods: void updateTicker() Form TranslateToForm (Assignment) member variables: AssignmentQueue m_aq int Ticker

11 ConfigEdit Class Config (extends midlet) Textbox Form ChoiceGroup FileIO Instantiates Accesses

12 Config Public methods: -void writeFile() -void readFile() -bool getGPS() -void setGPS(bool) -void setLog(bool) -bool getLog() -string getServerAddress() -void setServerAddress(string) -void exit() Member Variables - string _serverAddress, _file; - bool _GPSselected, bool _Logselected; - ChoiceGroup _GPS, _Log; - TextBox _server; - Form _form;

13 Form Public methods: Void append(Item i): TextBox Public methods: Void setInitialInputMode(string): string getString(); void setString(String); ChoiceGroup Public methods: ChoiceGroup(String, int, String[], Image[]) int getSelectedIndex() void setSelectedIndex(int e, bool s)

14 That’s all folks! Any questions on the class diagram for either the main program or the config?

15 Class Diagram Controller (extends midlet) GPS Server Connection Assignment Queue User Interface Form Assignment Parser Server Backup File Instantiates Accesses DataPack


Download ppt "Cellphone Classes Ven Tadipatri, Matt Hatoun, Jennifer Wong, Michael Leen, Syung Youn Nam."

Similar presentations


Ads by Google