Class UserRepository(data)
-
Takes parameter of all users's data (data)
-
SRP: Evaluate and compare data for all users
-
Method 1: matchIdtoData()
-
Method 2: calculateAvgStepGoalAllUsers()
Class User(userData)
- Takes parameter of single users’ data (userData)
- SRP: Evaluate data for individual users
Methods
- Method 1: returnFirstName()
Properties:
- this.userData = userData;
- this.id: "",
- this.name: "",
- this.address: "",
- this.email: "",
- this.strideLength: "",
- this.dailyStepGoal: "",
- this.friends: ""
Class Hydration(hydrationData)
- Takes parameter of all hydration data
- SRP: Review and evaluate at hydration data across all users
Properties:
- this.hydrationData = hydrationData;
- this.userId: "",
- this.date: "",
- this.numOunces: "",
Methods
- Method 1: calculateAvgDailyAmtDrankByUserIdAllTime()
- Method 2: calculateAmtDrankByUserSpecificDate()
- Method 3: returnDrinkAmtEachDayOverWeekByUser()
**Class Sleep (sleepData)
- Takes parameter of all users’ sleep data
- SRP: Review and evaluate sleep data across all users
Properties:
- this.sleepData = sleepData;
- this.userId: "",
- this.date: "",
- this.hoursSlept: “”,
- this.sleepQuality: "",
Methods
- Method 1: calculateAvgHoursSleptPerDayByUserId()
- Method 2: calculateAvgSleepQualityPerDayAllTimeByUserId()
- Method 3: returnHoursSleptByUserOnSpecificDate()
- Method 4: returnSleepQualityByUserOnSpecificDate()
- Method 5: calculateHoursSleptEachDayByUserOverSpecificWeek()
- Method 6: calculateAvgSleepQualityAllUsers()
- Method 7: findUsersWithAvgSleepQualityMoreThanThreeOverSpecificWeek()
- Method 8: findUsersSleptMostHoursIdentifiedByDate()
- Method 9: findDateUserSleptBest() - *Our own method
Class Activity(activityData)
- Takes parameter of all users’ activity data
- SRP: Review and evaluate activity data across all users
Properties:
- this.activityData = activityData;
- this.userId: "",
- this.date: "",
- this.numSteps: "",
- this.minutesActive: “”,
- this.flightsOfStairs: “”
Methods
- Method 1: calculateMilesUserWalkedOnSpecificDate()
- Method 2: returnMinutesActiveByUserOnSpecificDate()
- Method 3: calculateAvgMinutesActiveForUserOnSpecificWeek()
- Method 4: hasUserStepGoalBeenReachedOnSpecificDate()
- Method 5: filterAllDatesUserCompletedStepGoal()
- Method 6: findMostStairsClimbedForUserAllTime()
- Method 7: findUsersWithAvgSleepQualityMoreThanThreeOverSpecificWeek()
- Method 8: calculateAvgStairsClimbedOnSpecificDateAllUsers()
- Method 9: calculateAvgStepsTakenAllOnSpecificDateAllUsers()
- Method 10: calculateAvgMinutesActiveOnSpecificDateAllUsers()
- Method 11: findMostActiveDateForUser() - *Our own method