subject

In this exercise, you will write a class that represents how you spend your time during the week The class should have four double instance variables . . sleep fun School sports These variables will track the number of hours you spend doing each of these activites in a single day, respectively The class should also have the following methods ā€¢ A constructor that has no parameters public void setsleept double hours Sleep) public vold setFun(double hourstun public void set School(double hours School) public void set Sports (double hours Sports) mbate vota print Total) The constructor should initialize all of the instanco variables to 0 The methods that begin with "set" set the values of the corresponding instance variables to the value of the parameter The last method should print the total number of hours per week you spend doing each of these activities Note you will have to calculate the weekly hours by using the daily hours stored in the instance variables. It should also print the . . . . public void set School Buble hours School) Dublic void set Sports (double hours Sports) Dublic vota print Total The constructor should initialize all of the instance valables to o The methods that begin with "set" set the values of the corresponding instance variables to the value of the parameter The last method should point the total number of hours per week you spend doing each of these activities Note you will have to calculate the weekly hours by using the daily hours stored in the instance variables it should also print the total number of hours in the week accounted for and how many hours are left over Here is an example of the output of print Totate 3, chool - 8 = 2 and sports = 3 Weekly Totais STED School Dort Funt Ora Tot turto 0

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i.e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
You know the right answer?
In this exercise, you will write a class that represents how you spend your time during the week The...
Questions
question
Biology, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
English, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
English, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 19:01
question
Mathematics, 11.09.2020 20:01
question
English, 11.09.2020 20:01
Questions on the website: 13722362