Skip to content

3.) Object Oriented Analysis (UML Class Diagram)

bensontrinh edited this page Nov 5, 2012 · 12 revisions

Object Oriented Analysis (UML Class Diagram)

Note that we are using the word submission when we talk about fulfilling a task

UML Class Diagram

MVC Model

For our program design we will be using the MVC model.

  • View
    • Every view/activity implements the Observable class and has an update method that is called by the model.
  • Data Model
    • Our data model object is primarily the TaskManager class -- it will notify each view anytime the model is updated.
  • Controller
    • Each activity/view will contain a controller inside it that delegates each input into the view to our data model.

Data Model Class

  • TaskManager
    • Task Manager keeps all the data of the Tasks. They are stored as a list of "Task" objects. The manager will notify all the Observers (Views) and update them accordingly when any changes happen.

Views

  • TaskViewActivity
  • SubmissionViewActivity
  • AddSubmissionActivity
  • AddTaskActivity
  • MainActivity

The current idea is to have each View contain a Controller. Each view will implement the "Observrr" class so they will all contain the ".update" method.

Classes

  • Task
    • Basic information for each task as shown on the UML.
  • Submission
    • Basic Submission information as shown on the UML Diagram.
  • JSON Server
    • This will handle any kind of JSON related material such as getting information for a task, adding a task, updating a task and checking the connection to the server.

Design Patterns Used

  • Our project is based on the MVC Model which uses Observers/Observables
  • ImageAdapter,Picture used the Adapter pattern
    • Picture is a wrapper of the Bitmap which allows for Serialization and De-serialization. We do this because when trying to De-serialize the Bitmap object we obtain errors although Serializing it works.
  • We use the Singleton pattern for LocalStorage, JSONServer, and TaskManager