subject

Implement the class Day which represents a day of the week. Put the class definition in the header p1.h and the implementation in the p1.cpp file. You may not have any inline functions defined in the header file. Use the file xercise. cpp to check if your implementation is syntactically correct. Your class has one data members: dayNumber, and int which represents the day of the week (0-6). β€’ The working constructor sets dayNumber appropriately. If the argument is outside of the valid range, throw an invalid argument exception. Make sure that the constructor cannot be called implicitly, β€’ The getDay() accessor returns the dayNumber, β€’ The setDayO) mutator sets the day appropriately, throwing an exception similar to the working constructor if given an inappropriate input value. To save code, you may want to have the working constructor call setDay() so that the exception is only thrown from one place. β€’ The toString() member function returns the full English name of the day of the week. (0 is Sunday, 1 is Monday, etc.). β€’ The overloaded member operator==() returns true if two Day objects are equal. Use the dayNumber to compare them Exam C++ Quick Reference Complete the following files pl. cpp 1 2 3 #include #include #include 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #include "p1.h" 9 10 // Implement your member functions in this file 11 12 pl. 1 #ifndef Pl_H 2 #define Pl_H 3 4 5 #include 6 7 8 // Place your class definition here 9 // 10 11 class Day Les 54 seconds 5 include

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 22.06.2019 15:00
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
You know the right answer?
Implement the class Day which represents a day of the week. Put the class definition in the header p...
Questions
question
Arts, 12.05.2021 04:30
question
Mathematics, 12.05.2021 04:30
question
Mathematics, 12.05.2021 04:30
question
Mathematics, 12.05.2021 04:30
question
Mathematics, 12.05.2021 04:30
Questions on the website: 13722360