How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask John Your Own Question
John, Engineer
Category: Homework
Satisfied Customers: 798
Experience:  Bachelors Degree
Type Your Homework Question Here...
John is online now
A new question is answered every 9 seconds

Im having some major issues with this assignment and I see

This answer was rated:

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?




thanks for your question

I am John

upload all details and files to

send me the Download link or file ID
Customer: replied 3 years ago.

i added it to wikisend but I'm not sure how to see it

Customer: replied 3 years ago.

ok do you have the c++ file
Customer: replied 3 years ago.

yes it is probably way off but let me download it for you.


Customer: replied 3 years ago.

let me check it and send the code tomorrow , is it ok
Customer: replied 3 years ago. 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!


i didn't get your response
that' why i didn't try

ok wait 2 hrs
i will check this myDate.cpp
what errors coming
Customer: replied 3 years ago.

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.


ok let me check it

what is the problem with day number calculation
Customer: replied 3 years ago.

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.


here check the code below, i corrected it

if any issues, inform me
Customer: replied 3 years ago.

I'm not seeing any changes and I'm still getting the infinite loop.


some minute problems

check this screenshot, i run it correctly
Customer: replied 3 years ago.

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?


you are giving the input as
it is like this
12 12 2000

if you want 12/12/2000, then input it as a string and seperate it into day, month ,year
Customer: replied 3 years ago.

I'm brand new to this, can you provide an example on how to do that?



just wait

see the example below
Customer: replied 3 years ago.

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?


ok no problem
if you need as like that, i will change
otherwise please rate it
Customer: replied 3 years ago.

I was hoping to come out of here with a completely finished product is that possible?


ok i will try , but need some time
Customer: replied 3 years ago.

that sound great, thanks!


check tomorrow morning

Download the answer from below link

you can enter the date as mm/dd/yyyy
Customer: replied 3 years ago.

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.


let me check it

do you need the changes
Customer: replied 3 years ago.



ok i will do

I have modified the previous code as per requirements
download the link below

Hope this helps
If you need any changes, ask me before rating this ,
IF this answer is ok, please change the rating to "Excellent" or "Good"

John and other Homework Specialists are ready to help you

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 3 years ago.

thanks for fixing this. I appreciate you giving this time and ensuring it was done right. This helps a lot! thanks again!



For your future questions , Please post your questions starting with "For John"
Customer: replied 3 years ago.



ok thanks

Related Homework Questions