You are on page 1of 7

CS102

2E
Spring 2021/22

Project
Instructor: Aynur Dayanık Group

Assistant: Sena Er Elmas

Criteria TA/Grade Instructo


r r

Presentation

Overall

~ Habit Bear ~
Arctic Games
Mustafa Gökalp Gökdoğan
Öykü Demir
Elif Şen
Emir Şahin Dilli
Tevfik Emre Sungur

Detailed Design Report


( Draft )
24 April 2022

1. Introduction
Habit Bear is a habit tracker app which aims to assist its users while gaining a new habit or

getting rid of harmful habits. To make this habit gaining/quitting process more entertaining for its

users, Habit Bear allows users to create a bear character, customize it, and upgrade its features.

During this process, the user's customized bear will climb a mountain every day if that desired habit

is done and go down from the reached point if they skip that specific habit.

2. Details

2.1 Technologies That We Will Utilize

Since we are designing an android app, we are going to use an android based

software, and a virtual machine that enables us to test our program in android based software.

To hold user information and to store default elements which are important for the app, we are

using Firebase Database as a realtime database which is also a cloud and a non-relational

database.

Database:

Non-relational databases have a more flexible environment since we do not have to

be strict to the chosen variable types. Additionally our app does not require a lot of

interconnections which may have been a problem in a non-relational database. Realtime

databases are able to update the data on the app as soon as the data is changed on the

database. This feature is essential for our app since the user should be able to see the other

user’s current level on their own mountain in any time span. Cloud databases are suitable for

multi-user based apps. Every user can access and update one main database which is

essential for multi-user apps. All these three features of Firebase Database (non relational,

cloud, realtime) are suitable and efficient for our app.


Integrated Development Environment (IDE):

We use Android Studio Code for IDE because the emulator on the Android Studio

lets us emulate a variety of things. It allows us to test our code with a variety of device

configurations such as smartphones and tablets. It, also, comes with a Firebase Assistant.

This assistant helped us to connect the Firebase with the app. With the help of Vector Asset

Studio we could use a wide variety of images. Android Studio also provides a design view

feature which helps the developer to directly examine and update the existing components

on the user interface. These features are the reasons why we have chosen Android Studio for

our app.

2.2 UML Diagram, and Description of Classes and Methods

2.2a) UML Diagram


2.2b) Description of Classes and Methods

Mountain Class:

Mountain class holds the information of the specific mountain with:

● mountainNo: int, storing the current mountain’s level

● stepNo: int, storing the total number of steps on the current mountain

Methods:

● mountainProgress(int streak): Returns the current step on the mountain depending

on the ‘streak’ parameter.

Habits Class:

Habits class holds the information of the specific habit for specific user, with:

● editable: bool, checks if the current habit is editable since default habits (quit

smoking, eat healthy etc.) are not editable but custom habits are.

● user: Account, storing the specific user having this habit

● isDone: bool, checks if the habit is done.

Methods:

● onLastStep(): returns if the user has reached the top of the current mountain that user

is present.

● set(Account user): sets the user to the present habit.

● isDone(): returns if the user has done its habit on that specific day when this method

is called.

● updateToday(): updates the specific attributes of user, like currentMountain, coin

etc., assuming that the habit is done.


Clothes Class:

Clothes class holds specialized clothes that will be present in market section, with:

● color: Color, storing the color of the specific clothes.

● type: String, storing the type (shirt, pant, accessory) of the specific clothes.

● price: int, storing the value in coins of the specific clothes.

Methods:

● hasMoney(Account user): checks if the given user has enough coin to purchase the

current clothes.

Account Class:

Account class holds the information of the users using this app, with:

● habits: Habits[], storing the list of habits that are in progress by the current user.

● coins: int, storing the amount of coins of the current user.

● clothes: Clothes[], storing the list of clothes that the user has obtained.

Methods:

● isHabitDone(): checks all the habits whether they are done or not done. If all habits

are done, method returns 1. If none of the habits are done, the method returns -1. If

one part of the habits are done, the method returns 0. This method will be useful in

the calendar user interface since each day will have a specific color depending on the

completion of all habits.

● loseCoins(): lowers the total amount of coins by 5. This method will be useful when

the user does not do the existing habits. In that circumstance, the user will lose 5

coins.
● addHabit(String str): Adds the habit with name ‘str’ to the current habits.

Additionally, this method checks if the present habit is custom or not. If it is custom,

the user will be able to customize its habit in its own way.

2.3 List of the Classes/Features Each Group Member is Responsible For

Emir Şahin Dilli: Main objective is full stack development

Tevfik Emre Sungur: Main objective is database integration and backend development

Öykü Demir: Main objective is user interface design and frontend development

Mustafa Gökalp Gökdoğan: Main objective is backend development and database

integration

Elif Şen: Main objective is GUI design.

You might also like