Average Steps Taken
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:
- 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.
Furthermore, the records are stored in order of the date. For example, the first record in the file is for January 1st, and the last record in the file is for December 31st. Design a
Want to see the full answer?
Check out a sample textbook solutionChapter 10 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Artificial Intelligence: A Modern Approach
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Starting out with Visual C# (4th Edition)
Starting Out with Java: Early Objects (6th Edition)
- Row trigger that gives the sum total before insert or updatearrow_forwardC Language Patient Following System> Define a struct included patient number, name, age, and disease information.> Main menu of the program include the following operations:◦ create a patient file with 100 empty records.◦ Insert a new patient record.◦ Find and retrieve patient information.◦ Delete a patient record.◦ Modify a patient record.◦ List all patients informationarrow_forwardThe file that contains ordering attributes that are not key in nature is referred to as thearrow_forward
- Hospital :ER Case Study A General Hospital consists of a number of specialized wards (such as Radiology, Oncology, etc) .Information about ward includes unique name, total numbers of current patients. Each ward hosts a number of patients, who were admitted by a consultant (doctors) employed by the Hospital. On admission, the date and time are kept. The personal details of every patient includes name, Medical Recode Number (MRN), set of phone and one address (city, street, code). A separate register is to be held to store the information of the tests undertaken. Each test has unique episode No. , category and the final result of test. Number of tests may be conducted for each patient. Doctors are specialists in a specific ward and may be leading consultants for a number of patients. Each patient is assigned to one leading consultant but may be examined by other doctors, if required. uarrow_forwardHospital :ER Case Study A General Hospital consists of a number of specialized wards (such as Radiology, Oncology, etc).Information about ward includes unique name, total numbers of current patients. Each ward hosts a number of patients, who were admitted by a consultant (doctors) employed by the Hospital. On admission, the date and time are kept. The personal details of every patient includes name, Medical Recode Number (MRN), set of phone and one address (city, street, code). A separate register is to be held to store the information of the tests undertaken. Each test has unique episode No., category and the final result of test. Number of tests may be conducted for each patient. Doctors are specialists in a specific ward and may be leading consultants for a number of patients. Each patient is assigned to one leading consultant but may be examined by other doctors, if required.arrow_forwardLab Objectives To use functions that reads and writes from/to a file Problem 1 A database file contains binary data (Check the sample data at the end of this document). The file contains a number of records, each record is stored as a "struct". struct employee { . } The struct is written to the file using fwrite. The sample data contains one record with the following values. 123456, John Smith, 70 main St. Toronto, ON M3M 3M3, 9, 73123.45 Write a C program that performs the following The file name is lab6_1.c The file takes command line parameters (argc and argv) If the command line arguments "-ID" followed by an integer, look for an employee with that ID in the file. If that ID exists, print the name on a line by itself. If There is no such ID print "No such employee" on a line by itself. . int Employee_ID; char name [20]; // Employee name first name then last name char address [50]; //The employee address might contains spaces //Both name and address are terminated by //a null…arrow_forward
- PYTHON FILE HANDLING Write a python program that can create, add, and view books (Note: Do only 1,2 and 3). Create, Add and View REFERENCE: 1 - Create (1) Create a book.csv and enter at least five books. The following fields must be included. - Book Id - automatically generated - Title of the Book - Author - Publisher - Year - ISBN Sample Screen (1) Create Enter the following fields. Book Id: Title Author : Publisher: Year : ISBN : Add another: [Y/N]_ Sample Screen (2) Add Enter the following fields. Book Id : Title : Author : Publisher: Year : ISBN : The book has been added. Add another: [Y/N]_ Sample Screen (4) Search Search Title Book Id Title Book Id Title Sample Screen (3) View Book Id: Title 1) View by Title 2) View by Author 3) View by Year Sample Screen (5) Edit : Author : Publisher: Year : : ISBN Search Author Display the book you want to edit. (book id) Author Book Id : Title : The book has been updated. Sample Screen (6) Delete Display the book you want to delete. (book id)…arrow_forwardMonthly Sales Create a program that allows you to view and edit the sales amounts for each month of the current year. Example COMMAND MENU add - Add sales for specified month view - View sales for specified month edit - Edit sales for specified month totals - View sales summary for year exit - Exit program Command: add Three-letter Month: jan Sales Amount: 10317 Sales amount for Jan is 10,317.00. Command: add Three-letter Month: feb Sales Amount: 15293 Sales amount for Jan is 15,293.00. Command: view Three-letter Month: jan Sales Amount: 14317 Sales amount for Jan is 14,317.00. Command: edit Three-letter Month: jan Sales amount for Jan is 14,317.00. Command: totals Yearly total: 29,610.00 Monthly average: 14,805.00 Command: view Three-letter Month: july Invalid three-letter month. Command: exit Bye! Specifications The program should use a list to store the sales data for each month with the three-letter abbreviation for the month (Jan,…arrow_forwardOverloading Operators as Non-members Instructions Grading When you have completed your program, click the Submit button to record your score.arrow_forward
- The Music Database The music database stores details of a personal music library, and could be used to manage your MP3, CD, or vinyl collection. Because this database is for a personal collection, it’s relatively simple and stores only the relationships between artists, albums, and tracks. The following is a list of requirements: i) The collection consists of albums; ii) An album is made by exactly one artist. There must be an artist and album; iii) An artist makes one or more albums (identifying relations); iv) An album contains one or more tracks; v) Artists, albums, and tracks each have a name; vi) Each track is on exactly one album. Vii) Each track has a time length, measured in seconds. The track may or may not be played and can be played as many times as required (non-identifying relations). When a track is played, the date and time the playback began (to the nearest second) should be recorded; this is used for reporting when a track was last played, as well as the number of…arrow_forwardA _____ access data allows the user to move to any record as long as he knows the location of the desired record. Is the answer here "random" (?)arrow_forwardHoliday Travel Vehicle (HTV) sells new recreational vehicles and travel trailers. When new vehicles arrive at HTV, a new vehicle record is created. Included in the new vehicle record are a vehicle serial number, name, model, year, manufacturer, and base cost. When a customer arrives at HTV, he or she works with a salesperson to negotiate a vehicle purchase. When a purchase has been agreed upon, a sales invoice is completed by the salesperson. The invoice summarizes the purchase, including full customer information, information on the trade-in vehicle (if any), the trade-in allowance, and information on the purchased vehicle. The invoice also summarizes the final negotiated price, plus any applicable taxes and license fees. If the customer requests dealer-installed options (simply options), they are listed on the invoice as well. A customer may decide to have no options added to the vehicle or may choose to add many options. Dealer-installed options are described by an option code,…arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,