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
John, Engineer
Category: Homework
Satisfied Customers: 762
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

Customer Question

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?

 

 

Submitted: 8 months ago.
Category: Homework
Expert:  John replied 8 months ago.
hi

thanks for your question

I am John

upload all details and files to www.wikisend.com

send me the Download link or file ID
Customer: replied 8 months ago.

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

Customer: replied 8 months ago.
Expert:  John replied 8 months ago.
hi

ok do you have the c++ file
Customer: replied 8 months ago.

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


 

Customer: replied 8 months ago.
Expert:  John replied 8 months ago.
hi

let me check it and send the code tomorrow , is it ok
Customer: replied 8 months ago.

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!

Expert:  John replied 8 months ago.
hi

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 8 months 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.

Expert:  John replied 8 months ago.
hi

ok let me check it
Expert:  John replied 8 months ago.
hi

what is the problem with day number calculation
Customer: replied 8 months 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.

Expert:  John replied 8 months ago.
hi

here check the code below, i corrected it

http://ge.tt/9cR9Ovv/v/0

if any issues, inform me
Customer: replied 8 months ago.

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

Expert:  John replied 8 months ago.
hi

some minute problems

check this screenshot, i run it correctly

http://ge.tt/8mAKQvv/v/0
Customer: replied 8 months 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?

Expert:  John replied 8 months ago.
hi

you are giving the input as
cin>>month>>day>>year,
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 8 months ago.

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


 

Expert:  John replied 8 months ago.
hi

just wait
Expert:  John replied 8 months ago.
hi

see the example below

http://ge.tt/6DKEYvv/v/0
Customer: replied 8 months 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?

Expert:  John replied 8 months ago.
hi

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

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

Expert:  John replied 8 months ago.
hi

ok i will try , but need some time
Customer: replied 8 months ago.

that sound great, thanks!

Expert:  John replied 8 months ago.
hi

check tomorrow morning
Expert:  John replied 8 months ago.
hi

Download the answer from below link

http://ge.tt/5Rc61zv/v/0

you can enter the date as mm/dd/yyyy
Customer: replied 8 months 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.

Expert:  John replied 8 months ago.
HI

let me check it
Expert:  John replied 8 months ago.
hi

do you need the changes
Customer: replied 8 months ago.

yeah

Expert:  John replied 8 months ago.
hi


ok i will do
Expert:  John replied 8 months ago.
hi


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

http://ge.tt/18xYy7w/v/0


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, Engineer
Category: Homework
Satisfied Customers: 762
Experience: Bachelors Degree
John and 4 other Homework Specialists are ready to help you
Expert:  John replied 8 months ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
Customer: replied 8 months ago.

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

Expert:  John replied 8 months ago.
hi

Welcome

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

ok

Expert:  John replied 8 months ago.
hi

ok thanks

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience