|
Post by chelsche on Mar 19, 2020 23:05:53 GMT
Has anyone attempted the last problem in the search and sort study folder? I'm working on part (a) and figured out how to sort based on a Client's arrival time, but I have no idea what to do for date comparison. Does anyone have any advice for working with dates? - what primitive data type would work best?
- String ("Feb 1, 2020);
- Separate ints (int mm, int dd, int yyyy); ie) 2, 25, 2002 (I think this would work best...)
- Using something found in the java libraries
I'm very lost. Ill working on it again later.
|
|
darwin
New Member
doesn't have covid19 yet
Posts: 4
|
Post by darwin on Mar 20, 2020 15:48:49 GMT
Considering the previous sample exam question, it appears that the Dates πΌπ
πΊππ uses integers for day, month and year. If the questions are not related in any way, then I would probably still use integers for day, month and year (maybe in the form of an array).
|
|
|
Post by chelsche on Mar 21, 2020 2:07:56 GMT
Thanks!
I was playing around with javaβs SimpleDateFormat Class to solve the problem, but I ended up backpedaling myself into a corner.
Iβll try the problem one more time on Monday and upload whatever I have to the study doc.
|
|
|
Post by Mr. Wachs (Admin) on Mar 22, 2020 16:07:29 GMT
I want to weigh in on this, but I am holding off a little to see how you all approach this problem...
|
|