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]
2 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]2 years ago
5 0

Answer:

It keeps saying servers fully loaded

Explanation:

You might be interested in
Which line in the following program will cause a compiler error? #include using namespace std; int main() { int number =5; if (n
DanielleElmas [232]

Answer:

  1. #include  <iostream>
  2. using namespace std;
  3. int main() {
  4. int number =5;
  5. if (number>=0&& number <=100){
  6.    cout<<"passed.\n";
  7. }
  8. else{
  9.    cout<<"failed.\n";
  10. }
  11. return 0;
  12. }

Explanation:

There where multiple errors in the code given in the questions

Line 1: Missing <iostream>

Line 5: The comparison operator was wrong correction is highlighted

Line 12 Missing closing brace for the main function

All the errors have been fixed and the code above compiles

4 0
2 years ago
The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?
IrinaK [193]

Answer:

A. aaa

bbb

ccc

ccc

ddd

B. bbb

ddd

ccc

ccc

C. bbb

ddd

aaa

aaa

D. bbb

ccc

ccc

ddd

8 0
3 years ago
Read 2 more answers
A(n) _______________ supplies one of the most critical aspects of docking stations, but in a smaller, more portable format: supp
baherus [9]

Answer:

A Port Replicators.

Explanation:

Port replicators are devices or extension. They are plugged into the laptop's usb port to provide extra ports to connect other external devices needed by the laptop.

Docking stations does the same thing, but the laptop is plugged into the docking station holding the needed devices, and meant for that laptop brand.

7 0
3 years ago
. Create an abstract Dollar class with two integer attributes, both of which are non-public (Python programmers - it is understo
aksik [14]

Answer:

Explanation:

The following code is written in Java. It creates the abstract dollar class that has two instance variables for the dollars and the coins that are passed as arguments. The test output can be seen in the picture attached below.

class Dollar {

   int dollars;

   double coin;

   private Dollar(int dollar, int coin) {

       this.dollars = dollar;

       this.coin = Double.valueOf(coin) / 100;

   }

   

}

4 0
2 years ago
Q1) Convert the decimal number 67 to binary?​
Mashutka [201]

Answer:

1000011

Explanation:

4 0
2 years ago
Other questions:
  • ​printers, monitors,​ tablets, cpus, and laptops are examples of​ ____________.
    14·1 answer
  • Why are high-quality transformers wound with large diameter wire?
    8·1 answer
  • You have compiled a new kernel using rpm. when you reboot, the new kernel is not the default selection on the boot menu. you use
    10·1 answer
  • Which of the following statements is TRUE?
    11·1 answer
  • Python
    6·1 answer
  • Write a Python program that inputs an integer between 0 and 1000 and adds all the digits in the integer. For example, if integer
    6·1 answer
  • Which of the following database object hold data?
    13·2 answers
  • Which file is usually the first file to be displayed when you navigate to a website?
    5·1 answer
  • HELPPP PLEASE <br><br> Html can be used to create complicated mobile applications <br> True or false
    10·1 answer
  • What are some of the most common obstacles in video games?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!