Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

Part A

Create a FitnessTracker class that includes three data fields for a fitness activity: a String for the name of the activity as activity, an int for the number of minutes spent participating as minutes, and a LocalDate for the date as date.

Create a default constructor that automatically sets the activity to running, the minutes to 0, and the date to January 1 of the current year. Overload the constructor so it receives parameters for each of the fields and assigns them appropriately.

Includes methods to get each data field.

Part B

Create an application that instantiates two FitnessTracker objects. Prompt the user for values for one object, and pass those values to the three constructor parameters. Retain the default constructor values for the other object. Display the values for each object.

An example of the program is shown below:

Enter activity >> swimming

Enter minutes spent swimming >> 90

Enter month >> 2

Enter day >> 24

Enter year >> 2021

Activity log:

swimming 90 minutes on 2021-02-24

running 0 minutes on 2021-01-01

O
O
STUDENT OBERGES LITERACTE SHUMPLEJ
Janda
Temban
PROJECTS
J
11
13
16
16
Ő https://literate-sniffle-x5wx9wg5x7w4fr5r.github.dev/?folder=/workspaces/9780357673423_java-programming...
28
MindTap X
import java.io.
public class testicacar
blycling
public static void main(string[] args)
Fitrackercise-ow Fitnesstracker
Compani X Q fitness tra X
Syst..tuwcis.getActivity()+"arcisa.gentinutas() +
Localitate date-Lacale.(, ,
Fiterackied-new Fitnesstrackwe("bicycling", 86, cate);
Systrici.gctivity)+ci.gontinutos() +
social et
am SO THUN FORT ⒸOM
ng-a-kardas-ok-t20-m-poundhapter VILLE DİVARIO
cp2406_f X Q testsand X
...totstan joa-programming-a-chuc-20-st sanchavarijichapterqikan pintudat (sepāre) $ ja -p "berspace
OʻGALE-HİKunciavačijichag tarquart (späte) $ja
... ja programing-me-sachuc--tam-se-raciydana (plnej š
pop-m-catzy_jna-programming-an-sandhuc-ok-tan-med-mouvenýchapter T
AN
Solved: C X C chegg.co X
☐
At
w
How to Use the Code Editor
1. Select the "Run Code' button to cute the program.
2. Select the "Calculate Grade" button to generate a score based on the completed tasks.
1. Continue to modify, run, and calculate your code unt you are happy with the grade.
4. Select the "Submi" button to turn in the assignment to your instructo
Part A
seter activity
ing
ser ut spot winning w
inter 2
etter day 2524
ter year 201
Activity log:
ne minutes 2825-02-20
ingen 221-1-1
Task Focate the treacher das
Create a Fitnesstracker class that includes three data fields for a fitness activity: a string for the name of the activity at activity, an ist for the number of minutes spent participating as minutes, and a localute for
the date.
Tsk Add the the data fields to the Fitnesstracker class.
Q
Create a default constructor that automatically sets the activity to running, the sites to 0, and the date to January 1 of the current year. Overicad the constructor so it receives parameters for each of the fields and
aigns the appropriately.
Includes methods to get each datafield.
Part B
Task Focate the detectacconc
cp2406_f X
Al
Create an application that instantiates two Fitresstracker objects. Prompt the user for values for one object, and pass those values to the three constructor parameters. Retain the default constructor values for the
other object Display the values for each object.
An example of the program is shown below
Task include get methods for each datafield.
Task Forlad the Fitnesstracker contractar to accept parameters for each data faid
Your current grade: 0.00%
Success X
RUN CODE CALCULATE GRADE
{}
וח
+
000
SUBMIT
Bo
*
expand button
Transcribed Image Text:O O STUDENT OBERGES LITERACTE SHUMPLEJ Janda Temban PROJECTS J 11 13 16 16 Ő https://literate-sniffle-x5wx9wg5x7w4fr5r.github.dev/?folder=/workspaces/9780357673423_java-programming... 28 MindTap X import java.io. public class testicacar blycling public static void main(string[] args) Fitrackercise-ow Fitnesstracker Compani X Q fitness tra X Syst..tuwcis.getActivity()+"arcisa.gentinutas() + Localitate date-Lacale.(, , Fiterackied-new Fitnesstrackwe("bicycling", 86, cate); Systrici.gctivity)+ci.gontinutos() + social et am SO THUN FORT ⒸOM ng-a-kardas-ok-t20-m-poundhapter VILLE DİVARIO cp2406_f X Q testsand X ...totstan joa-programming-a-chuc-20-st sanchavarijichapterqikan pintudat (sepāre) $ ja -p "berspace OʻGALE-HİKunciavačijichag tarquart (späte) $ja ... ja programing-me-sachuc--tam-se-raciydana (plnej š pop-m-catzy_jna-programming-an-sandhuc-ok-tan-med-mouvenýchapter T AN Solved: C X C chegg.co X ☐ At w How to Use the Code Editor 1. Select the "Run Code' button to cute the program. 2. Select the "Calculate Grade" button to generate a score based on the completed tasks. 1. Continue to modify, run, and calculate your code unt you are happy with the grade. 4. Select the "Submi" button to turn in the assignment to your instructo Part A seter activity ing ser ut spot winning w inter 2 etter day 2524 ter year 201 Activity log: ne minutes 2825-02-20 ingen 221-1-1 Task Focate the treacher das Create a Fitnesstracker class that includes three data fields for a fitness activity: a string for the name of the activity at activity, an ist for the number of minutes spent participating as minutes, and a localute for the date. Tsk Add the the data fields to the Fitnesstracker class. Q Create a default constructor that automatically sets the activity to running, the sites to 0, and the date to January 1 of the current year. Overicad the constructor so it receives parameters for each of the fields and aigns the appropriately. Includes methods to get each datafield. Part B Task Focate the detectacconc cp2406_f X Al Create an application that instantiates two Fitresstracker objects. Prompt the user for values for one object, and pass those values to the three constructor parameters. Retain the default constructor values for the other object Display the values for each object. An example of the program is shown below Task include get methods for each datafield. Task Forlad the Fitnesstracker contractar to accept parameters for each data faid Your current grade: 0.00% Success X RUN CODE CALCULATE GRADE {} וח + 000 SUBMIT Bo *
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education