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, 21.06.2019 22:00
Which of the following statements correctly identifies a problem with sanitization methods? a. methods are not available to remove data ensuring that unauthorized personnel cannot retrieve data.b. even fully incinerated media can offer extractable data.c. personnel can perform sanitization steps improperly.d. stored data is physically etched into the media.
Answers: 1
question
Computers and Technology, 21.06.2019 22:00
Matlab question: use switch and anythe lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10.if there is a match of all 3 numbers, the winning $ 1000.if there is a match with 2 numbers, the winning $ 10.if there is a match of all with 1 numbers, the winning $ 1.with no match, the winning is $0.write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers.the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode.the ouput should return the variable winnings and the three winning numbers in the row array winnumbers.hint: make use of the internal function any.restriction: the function must use switch-case statements to determine the winning.example #1: winning = lottery3( [1,2,1],[1,2,3])produceswinning =10example #2: [winning,winnumbers] = lottery3( [1,2,3])produceswinning =3winnumbers =8 5 3
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
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
Social Studies, 16.02.2021 01:00
question
Chemistry, 16.02.2021 01:00
question
Mathematics, 16.02.2021 01:00