1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lady bird [3.3K]
3 years ago
12

A. Modify the FitnessTracker class that includes data fields for a fitness activity, the number of minutes spent participating,

and the date. The class includes methods to get each field. In addition, 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. Create an application that demonstrates each method works correctly.
b. Create an additional overloaded constructor for the FitnessTracker class you created in Exercise 3a. This constructor receives parameters for each of the data fields and assigns them appropriately. Add any needed statements to the TestFitnessTracker.java application to ensure that the overloaded constructor works correctly, save it, and then test it.


An example of what it should look like:

running 0 minutes on 2021-01-01

bicycling 35 minutes on 2020-08-20


What's done:

import java.time.*;

public class FitnessTracker {

String activity;

int minutes;

LocalDate date;

// constructor for 3a

public FitnessTracker() {

}

// constructor for 3b

public FitnessTracker(String a, int m, LocalDate d) {

}

public String getActivity() {

}

public int getMinutes() {

}

public LocalDate getDate() {

}

}
Computers and Technology
1 answer:
Elenna [48]3 years ago
5 0

Answer:

It keeps saying servers fully loaded

Explanation:

You might be interested in
two Smallest (10 points). Write a program TwoSmallest.java that takes a set of double command-line arguments and prints the smal
Umnica [9.8K]

Answer:

Below is the program TwoSmallest.java with each step explanation in form of comments.

public class TwoSmallest {                     // class definition

//main class having string args as a parameter

   public static void main(String[] args)

{ if (args.length < 2)

{         //string length must not be less than 2 for proceeding

           System.out.println("Please provide double values as command line arguments");

  }

else {  

// first two entries of string are checked for min1 and min2 and stored in variables with data type double

           double min1 = Double.parseDouble(args[0]), min2 = Double.parseDouble(args[1]), num;

//when min1 will be greater than min2 it will be stored temporary in variable temp having data type double

           if (min1 > min2) {

               double temp = min1;

               min1 = min2;

               min2 = temp;  //value of temp will be stored in min2

           }

//loop will check for each entry remaining until the last character of string

           for (int i = 2; i < args.length; i++) {

               num = Double.parseDouble(args[i]);

               if (num < min1) {

                   min2 = min1;

                   min1 = num;

               } else if (num < min2) {

                   min2 = num;

               }

           }

//min1 will give the 1st minimum number and min2 will give 2nd minimum.

           System.out.println(min1);

           System.out.println(min2);  

//both characters will be printed in sequence

       }

   }

}

4 0
3 years ago
Workspace Remember for a moment a recent trip you have made to the grocery store to pick up a few items. What pieces of data did
PtichkaEL [24]

Answer:

ATM card and the pin number, the status of the bank account and the total of the purchase and the account and method of payment.

Explanation:

The POS or point of service is a device that allows the purchase of product from a commercial store to be done wirelessly and cashless.

It promotes The cashless policy to reduce the circulating physical currency. The POS electromagnetic wave to wirelessly access bank database to retrieve bank account information.

It takes in the smart card, and with the command, retrieves the bank account information addressed on the card. The cashier types the total price of purchased product and it is automatically minus and updated on the account database. Then the invoice of the transaction is issued to the customer.

8 0
3 years ago
Quinn is opening an Excel workbook and receives an information bar and warning that the workbook contains macros. Quinn is promp
Andrew [12]

Answer:

Check where the file originates from, and if it is a trusted source or his own workbook, click Enable Content.

Explanation:

4 0
3 years ago
Read 2 more answers
You can add chart and axes titles on the chart tools format tab or with the chart elements buttom. true or false
Zepler [3.9K]
True. You can add chart and axes titles on the chart tools format tab or with the chart elements button.
4 0
3 years ago
What's the first step in being a wise consumer of media?
BARSIC [14]
Pay attentions to what you are watching and or listening to.
3 0
3 years ago
Read 2 more answers
Other questions:
  • A _______________ is a field that contains data unique to a record.
    15·1 answer
  • How to copy single slide to powerpoint
    15·1 answer
  • You open a web page and log into your email. The traffic travels over many routers. What protocol will the routers use to determ
    6·1 answer
  • While working a night job at a call center, Eric creates an app called EatOut, which can be used to place orders at restaurants,
    14·1 answer
  • What would be the result of the following code? ages = {'Aaron' : 6, 'Kelly' : 3, 'Abigail' : 1 } value = ages['Brianna']
    9·1 answer
  • g Write a program that prompts the user for an integer n between 1 and 100. If the number is outside the range, it prints an err
    5·1 answer
  • Pressing the e key while in edit mode will exit the interaction mode<br><br> true<br><br> false
    7·1 answer
  • What type of maintenance is required of a computer’s power supply to ensure that it remains in working order?
    15·2 answers
  • What is a common use for append queries?
    14·2 answers
  • The most serious security threat to Bluetooth-enabled devices is ____, which occurs when a hacker gains access to the device and
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!