Question: In C + + Please Program Objective: You are tasked with creating a test of a dayNumber function. You are not writing the dayNumber function,
In C Please
Program Objective:
You are tasked with creating a test of a dayNumber function.
You are not writing the dayNumber function, only coding the test of this function
Read the pre and post conditions for testDayNumber in functions.h
Implement testDayNumber
You may choose to implement dayNumber, however, please do not submit your version of dayNumber
functions.h listed below:
Precondition: not any
Postcondition: If the input string date is a nonempty string in the format of mdy where m d and y where
nonnegative integers the function returns a number from to ; the number of days from the beginning of the year,
where January st returns and December st returns either or depending on the year.
Returns when the provided input string is not a valid date. By the given format, any year greater than is valid.
unsigned short dayNumberconst char date;
Precondition: not any
Postconditon: Returns if all test cases for dayNumber passes. Otherwise, returns a number greater than where
the number correlates to the first test case that failed. This function is NOT chatty.
unsigned short testDayNumber;
Starter Code listed below:
#include "functions.h
unsigned short testDayNumber
if dayNumberValid date of January st should return no matter what the year is
return ;
TODO: Add more tests
return ; All tests passed
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
