#Java Question

14 messages · Page 1 of 1 (latest)

wet yoke
#

I'm a beginner and having trouble with this code
Create a class named MyTime with the following properties:
Data members –
hh
mm
ss
Take two MyTime objects and find out the difference between two objects in human readable
format. Display two given values and resulted value in human readable format.

carmine canyonBOT
#

This post has been reserved for your question.

Hey @wet yoke! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

noble path
#

what have you done so far

wet yoke
#

Do you mean by projects or java basics i've covered so far?

near wadi
#

also how far have you gotten. do you have the two MyTime objects initialized?

noble path
#

what part are you stuck on exactly

wet yoke
#

like how do i collect two objects diffrence with a method

#

or what should be proper way of doing so?

noble path
#

you have to implement it yourself

#

what does it mean to subtract 2 times

steady glen
#

Calculate the total number of seconds in your time objects and subtract one from the other to get the difference, then you can convert that difference into hours/minutes/seconds again if you want.

If you want more specific help than that, you’re gonna wanna show us your existing code so we can see what you’re working with.