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, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
question
Computers and Technology, 23.06.2019 22:00
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
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
Mathematics, 27.08.2020 23:01
question
Mathematics, 27.08.2020 23:01
question
Mathematics, 27.08.2020 23:01
question
Mathematics, 27.08.2020 23:01
question
Mathematics, 27.08.2020 23:01
question
Mathematics, 27.08.2020 23:01
question
Chemistry, 27.08.2020 23:01
Questions on the website: 13722363