Questions & AnswersJava Programming

Pseudocode and flowchart please Fitness Tracker Techniques...

Question
Answered step-by-step
Asked by AgentRamMaster1931 on coursehero.com

Pseudocode and flowchart please Fitness Tracker Techniques...

Pseudocode and flowchart please

Fitness Tracker

Techniques required: Control break processing, file handling, arrays, loops, modules/functions

 

A Personal Fitness Tracker is a wearable device that tracks your physical activity, calories burned, heart rate, sleeping patterns, and so forth. One common physical activity that most of these devices track is the number of steps you take each day. Assume that you have a file that contains the number of steps a person has taken each day for a year. The data is stored in the file as records. Each record contains the number of steps taken on a specific date.

Each record contains the following fields, on a single line:

  • The month, stored as an integer. January 1, February 2, etc.)
  • The day of the month, stored as an integer.
  • The year, stored as an integer.
  • The number of steps taken on the specified date, stored as an integer.

Example Data From File:

01 02 2022 10374
01 03 2022 7378
01 04 2022 12122
.
.

Furthermore, the records are stored in order of the date. For example, the first record in the file might be January 1st, and the last record in the file might be December 31st. Keep in mind, the user may not have recorded data for every day of the year.

 

Design a modular program, using at least two modules/functions other than Main(), that reads the file and displays the average number of steps taken for each month.

 

File Name: fitness.dat

 

WARNING: If you submit a project that uses a programming language or scripting language, it will not be accepted.

Example of Required Output

These are example numbers and your program should work with any numbers the program produces:

Average Number of Steps By Month

Month                         Steps  
------------------------------------------------
January                       18254
February                      22179
.
.
.

Other Requirements

Your solution must use at least the TWO MODULES/FUNCTIONS defined below, but you may use more. You are welcome to use other MODULES/FUNCTIONS in your code in addition to the required functions.

WARNING: If your Modules/Functions do not follow the requirements below, large point deductions will be taken.

  • Function/Module #1 - Your choice on which you choose to implement
    • Reads the data from the file and stores the steps taken, by month into an array. The module/function returns the array when the file has been read.
  • Function #2
    • Calculates the average steps taken
      • The function will receive two values:
        • Number of days counted in the month - The user may not have recorded data for every day of the month
        • The number of steps taken
    • Returns the average steps taken for the month

 

Answer & Explanation

Solved by verified expert
Answered by SuperThunder9384 on coursehero.com

sectetur adipiscing elit. Nam lacin

sectetur ad

sectetu
sectetur adipiscing eli
sectetur adipiscing e
sectetur adipis
sectetur adipi
sectetur adipiscing elit. Nam lac
sectetur adipiscing elit.
sectetur adipiscing elit
sectetur adipiscing elit. Nam
sectetur adipiscing elit.

CliffsNotes Logo

Unlock access to this and over
10,000 step-by-step explanations

Unlock Explanation

Have an account? Log In

<p>sectetur adip<br/>sectetur adipiscing elit. Nam lacinia pulvinar tortor nec fac<br/>sectetur adipisc<br/>sectetu</p><p>sectetur a</p><p>sectetur ad<br/>sectetur adipiscing eli<br/>sectetur<br/>sectetur adipiscin<br/>sectetur<br/>sectetu<br/>sectetur<br/>sectetur<br/><br/>sectetur adipiscing elit.<br/>sectetur adipiscing elit. Nam lacin<br/><br/>sectetur adipisci<br/>sectetur adipiscing<br/>sectetur adipiscing elit.<br/>sectetur adipiscing eli<br/>sectetur adipiscing elit<br/>sectetur adipiscing elit.<br/>sectetur adipiscing elit. Nam l<br/>sectetur<br/><br/>sectetur adipis<br/>sectetur adipiscing<br/><br/>sectetur adipi</p><p>sectetur adipiscing elit. Na<br/>sectetur adipiscing el<br/>sectetur<br/><br/>sectetur adipiscing elit. Nam lacini<br/>sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellent<br/>sectetur adi<br/>sectetur adipiscing elit. Nam lacinia pulvinar tortor n<br/>sectetur adi<br/>sectetur adipiscing elit.<br/>sectetur adi<br/>sectet<br/><br/>sectetur adipi<br/>sectetur ad<br/><br/>sectetur adipiscing el</p>

Step-by-step explanation

sectetur adipiscing elit. Nam lacinia pulvinar to
sectetur adipiscing elit. N
sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilis
sectetur adipiscing elit. Nam lacinia pulvinar tortor
sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam ri
sectetur adipiscing elit. Nam lacinia pulvinar tortor n
sectetur a

 

sectetu

 

sectetu

 

sectetu

Get unstuck with a CliffsNotes subscription

Example CliffsNotes Question and Answer
Unlock every step-by-step explanation, download literature note PDFs, plus more.Get Access

Related Q&A