I'm having some major issues with this assignment and I see that someone has worked it before. is there anyone that can repost what the solution was? here is the assignment below: Coding Requirements and Restrictions 1. All variables must be declared locally , i.e., inside a function, not outside. No global variables are to be used. 2. Do NOT use any language constructs that have not been covered in class. 3. Be sure to make your code readable by using good variable names, indentation and spacing (All coding conventions for this course!) 4. All functions must be documented with an appropriate description immediately before the function. This is similar to a program prolog, but only describes the function that follows. Function descriptions were described in the Style section of this module. Also, be sure to name all functions EXACTLY as named below and be sure to use the EXACT same parameter list in the EXACT same order as given below. Your return types should also match the requirements below. NOTE: being exact with function names, return types, and parameter lists is NOT an option, but a strict requirement for this assignment! Write and test a program to: XXXXX XXXXX a date and 1. determine if the date is a valid date 2. if the date is valid, print the date and day number in the year Input specifications: The input will be in the form: int/int/int, where the integers, in order are: month/day/year (see format below). The program should prompt for all input. Output specifications: If the date is not valid, print an error message. If the date is valid, print the date (formatted as DD-Month-YYYY) and then print the day number. For example, if the user enters: 3/7/1999 your program should output: 07-March-1999 is day number 66 in 1999 The format of the displayed date is: a zero-filled, two-digit day number, a dash, full name of month, a dash, zero-filled, four-digit year. Processing specification: After getting one date and printing the result, your program should then ask the user whether he wishes to continue. The program should execute until the user wishes to stop. Implementation requirement: Note: The only use of output statements should be in either the main, getDate (for the prompts only) or printDate functions. Do not print output from any other functions. All output statements should be in main, getDate (for the prompts only) or printDate functions. No other functions should have output statements! int main() Description: Here is the algorithm for the main function. begin print a description of the program for the user repeat call the getDate function to get the three values of a date if the date is valid (call the validDate function to determine this) call the printDate function to display the date call the dayNumber function print the number of the day as computed by dayNumber else print an error message ask whether user wishes to continue until the user enters a ‘N’ or ‘n’ end NOTE: While this algorithm for main can be used to test the five functions described below, your instructor will also be using a different version of main to test your getDate, validDate, isLeapYear, printDate, and dayNumber functions. THIS is why you want to make sure you write these functions exactly as described: same name, same return type, and exact same list of parameters! void getDate (int& day, int& month, int& year); Description: Prompt for and read the numbers for a date. The values are then returned through the by-reference parameters. The format of the input is m/d/yyyy. (Hint: ‘/’ is a character so it can be read using cin. Just read the character and then ignore it.) Set day to the third input, month to the first and year to the fifth. Discard the second and fourth inputs. Here is an example of what the user will see and do when the getDate function executes: Enter a date: 6/2/1958 The prompt is displayed by the getDate function. The user input is in bold blue. bool validDate (int day, int month, int year); Description: Given the numbers for the date, i.e., day, month and year, determine whether these values represent a valid date. Return true is the date is valid, false otherwise. Limit the years from 1 to 3000. You must also consider leap years. This can be done by having this function call the isLeapYear function (described next). Examples of invalid dates are: 14/4/1999 1/40/3999 2/29/1900 11/-11/2001 bool isLeapYear (int year); Description: Determine whether the parameter, year, is a leap year. Return true is the year is leap, false otherwise. A leap year is defined as a year that
any chance I can get this within the next 6 hrs?
i added it to wikisend but I'm not sure how to see it
yes it is probably way off but let me download it for you.
http://www.wikisend.com/download/170572/ sure I waited too long and had to turn in the garbage that I had, so at this point I just need to learn what I did wrong and hope he'll give me some credit for improving it. Thanks!
no errors, it is miscalculating the day in the year. and it will not allow me to exit when I enter N sometimes it will infinitely loop. I'm sure there are other issues too.
it spits out the first day of the year every time. i'm not sure if it is how i'm calling it or if it is in the function.
I'm not seeing any changes and I'm still getting the infinite loop.
yep the day number is XXXXX better. but the exit isn't working and it seems to only work when the date is input with spaces. is there any way I can have it read in the / and ignore that character like the requirement is stating?
I'm brand new to this, can you provide an example on how to do that?
okay sir, I'm puzzled. I guess I need to rate you now. However with this being my first experience I wasn't sure what to expect. I feel like I'm paying for only a portion of your attention. I have clear requirements of what my mostly done, project needs to look like and I'm only getting minor fixes here and there. I am not allowed to use global variables or arrays as stated in my requirements, I can't get my program to exit, it still loops infinitely under certain conditions. I haven't gained much during this experience. Is this normal?
I was hoping to come out of here with a completely finished product is that possible?
that sound great, thanks!
month does not convert to letters. example 3/7/2000 should be 07-march-2000. also I am not allowed to use arrays in get date. this information was outlined in the requirements.
thanks for fixing this. I appreciate you giving this time and ensuring it was done right. This helps a lot! thanks again!