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 17:30
How do you make a lenny face? plz, brailiest to who can answer first.
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
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
Biology, 21.01.2021 02:30
question
Mathematics, 21.01.2021 02:30
question
Geography, 21.01.2021 02:30
Questions on the website: 13722363