Skip to content

CRC Cards

asad70 edited this page Nov 3, 2021 · 3 revisions
MainPage
Responsibilities Collaborators
Use valid unique identifier -> gives access to display daily habits, list of habits to add habits, and user profile events. MainActivity
Displays all info about habit and list of health events Profile
Has edit and delete buttons for habit and add button for list of events Habits
Addition of new habits Add/Edit habit event
Editing of existing habits User search
Stores and updates the new habits/existing habits data to firebase
Habits
Responsibilities Collaborators
Class for adding all properties of a given habit MainPage
Get all habits from unique identifier for user Habit Events
Gives reference to add/edit habits Habit display
Helps display theses items on MainPage by retrieving the required data from firebase Profile
MainActivity
Responsibilities Collaborators
Get user access to their profiles and habits trough unique identifier -> username and password and redirects to main page MainPage
Checks if the user name and password match and user exists in the firebase Profile
HabitDisplay
Responsibilities Collaborators
Called on habit clicked event MainPage
Displays all info about habit and list of habit events Habits
Has edit and delete buttons for habit and add button for list of events Habit Events
Retrieves all info about habit and list of habit events from firebase Add/Edit habit
Add/Edit habit event
Profile
Profile
Responsibilities Collaborators
Adds unique identifier for user and information regarding friends and requests MainActivity
Used to access and display above info on MainPage
Serves as a reference for the user info in firebase
UserSearch
Responsibilities Collaborators
Displays results for search for users MainPage
Gives the option to follow or request another user to see their habits Profile
Adds to current user's pending requests and to user's received requests on MainPage in the user section
Retrieves the available users from the database and display them in the search
EditHabbit
Responsibilities Collaborators
Adds new or edits exiting habit MainPage
Called by the add button on MainPage or edit button in HabitDisplay Habits
Saves the edited data on the firebase HabitDisplay
EditHabbitEvent
Responsibilities Collaborators
Adds new or edits exiting habit HabtEvents
Includes add, edit, punctuality Habits
date(scroller), status and optional data HabitDisplay
called either by the add or edit button
HabitEventDisplay
Responsibilities Collaborators
Shows the data of the selected habit event from the associated habit HabitEvents
Edit and delete buttons for habit events Habits
EditHabbitEvent
HabitEvents
Responsibilities Collaborators
gives list of events associated with a particular habit EditHabbitEvent
Tells whether habit occurred on a date and helps calculate progress Habits
Stores date, status (done or not), optional comment, photo or geolocation of event-> class for hiding this type of data Profiles
Clone this wiki locally