I'm having a problem with a program I'm doing for class. The first part I have finished, it's a program that allows the user to enter a number from 1 to 365, and it outputs what Month and day of the month that number is associated with. My problem arises in the second part of the program in which I need to modify the program so that it allows the user to enter a month and day of the month, and outputs the associated day of the year. Essentially the finished program should allow the user to enter whichever they wish, and receive the opposite as output. I think I need to use an overloaded constructor that accepts a string, and an integer, but I'm not sure where to go from there.
Jump to Post
Please show us the code that you've come up with so far and we can help guide you.
Jump to Post
Yeah, I basically thought that, I suppose most of my confusion has derived from the way the instructions are worded in the instructions are worded. They say this: "...add a constructor that takes two parameters: a string representing a month and an integer in the range of 0 to 31 …
All 6 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.