I am a beginning Java programmer that is working on a basic program for invoicing. This program must print todays date on the invoice, and then print a ship date of 7 days later. There are two classes, invoiceDriver and invoiceGUI. The dates are printed in the GUI.
I need to create two methods in my invoiceDriver class as follows:
- Returns the current date as type string
- Returns the date 7 days after the current date as type string
I have been working on this for awhile, experimenting with the Date and Calendar java.utils, but I have not had any luck with adding the 7 days to the current date because in order to add the 7 days, the current date must be of type date, but it needs to return a string type, so my IDE returns errors.
Can anyone show me how to do this?