Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Creating good habits and breaking bad ones is no easy task. To keep track of certain habits or achieving personal goals, more and more people
Creating good habits and breaking bad ones is no easy task. To keep track of certain habits or achieving personal
goals, more and more people rely on so called habit trackers to help them throughout the day. If you check out
any popular app store, youll find no shortage of habit tracking applications in a wide range of quality and prices.
Recently, a client has approached you and wants you to help them build a basic Python backend for a habit track
ing app, which they want to roll out later this year. To make this project feasible, you must focus on the essential
functionality of such an application. You are not asked to provide any sort of graphical user interface, just the
basic functionality of a habit tracker using objectoriented and functional programming in Python, according to
the following specifications.
Formally, a habit is a clearly defined task that must be completed periodically eg brush your teeth every day or
go to the dentist once every year The basic building blocks of a tracking app are as follows:
o A user can define multiple habits in the application. A habit has a task specification and a periodicity.
o A task can be completed, iecheckedoff by a user at any point in time.
o Each task needs to be checkedoff at least once during the period the user defined for the respective
habit. If a user misses to complete a habit during the specified period, the user is said to break the habit.
o If a user manages to complete the task of a habit x consecutive periods in a row, I.e without breaking
the habit, we say that the user established a streak of x periods. For instance, if a user wants to work out
every day and does so for two full weeks, they establish a day streak of working out.
o The habits users enter in the app are not only stored but can also be analysed. Users want answers to
several questions like: whats my longest habit streak? What's the list of my current daily habits? With
which habits did I struggle most last month?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started