Question: a. Construct a Date class function named isWeekday() that returns a Boolean value of true if the date is a weekday; otherwise, it should return
a. Construct a Date class function named isWeekday() that returns a Boolean value of true if the date is a weekday; otherwise, it should return a false value. The function should call the dayOfWeek() function written for Exercise 5a, and then use the returned integer value to determine whether the day is a weekday. A weekday is any day from 2 to 6, which corresponds to the days Monday through Friday. b. Include the function written for Exercise 6a in a complete program. For testing purposes, use the fact that March 12, 2011, was a Saturday and March 15, 2011, was a Tuesday
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
