Time conversion

• 3
• Locked
Hours are few, but seconds are many. Perhaps measuring time in seconds would give the illusion that we have more time than we really do? Anyway, enough philosophizing. Let's work on programming. We need to implement a method that will convert hours to seconds, and then we'll see what this gets us.
You can't complete this task, because you're not signed in.
David
Level 4 , Spain
17 March, 08:58
Hello people!! and if we want to get the seconds from -1 hour? 45 minutes, for example. Have you raised it?
acg.comured
Level 4
14 June 2021, 16:04
ok
Harikrishnan B
Level 3 , Bangalore, India
22 September 2020, 02:23
Can someone help here to understand whats the problem here, it says requirement not met :( Thanks in Advance!
Harikrishnan B
Level 3 , Bangalore, India
22 September 2020, 02:26
False alarm guys. the method spelling was incorrect . its Resolved
Usman Full Stack Developer at QA
23 June 2021, 15:57
haha happens to all of us :)
Edddieg
Level 15 , Providence, United States
5 June 2020, 17:13
- first convert hours to minutes ==(1 hr = 60 mins) - then convert minutes to seconds == ( 1min = 60 secs) - multiply hours by minutes (60 min) - then multiply the minutes you get by seconds (60 sec) - hopefully this helps -
MD Alice
Level 3 , Petah Tikva, Israel
20 June 2021, 19:47
Exactly! I forget about minutes LOL
Deborah Wenrich
Level 7 , Pembroke Pines, United States
23 April 2020, 02:40
122 tries to understand that the problem was not asking me to convert the numbers or to multiply the hours by the seconds but to return the hour *60*60; under the public static and to print System.out.print ln(convertToSeconds (6)); and System.out.println (convertToSeconds (12));
Pina
Level 4 , PALERMO, ITALIA
7 February, 18:09
I did not understand. could you explain it to me? :(
Anoop Ravuri
Level 4 , Chesterfield, United States
22 January 2020, 17:45
I could print correct value for seconds but not understanding what requirement 2 and requirement 4 says. Can someone please help
Christian Papaleo
Level 4 , Italy
23 January 2022, 11:03
The 2nd only says you have to convert the number of hours in seconds. you have to multiplicate seconds * minutes + hours. The 4th says you have to use System.out.println().
Andrea
Level 20 , United States
30 June 2019, 02:30
I printed out the correct number of seconds, adding "Number of Seconds: " to explain what I was showing yet that failed the 4th requirement. Removing the "Number of Seconds" text met the 4th requirement. This does not make sense because the requirement just said to display the result of the calls, which I did.
Clarence L Mackey
Level 4 , Fresno, United States
13 June 2019, 01:08
just dont forget that thing about hours, minutes, and seconds
dean
Level 8 , Deutschland, Germany
15 April 2019, 16:56
why not just call the println method in the convertToSeconds method instead of return and then call it from the main? what's the advantages of using that instead of what i've mentioned? as the one i've mentioned is shorter
mastere
Level 9 , Rochester, United States
6 October 2020, 12:34
Nothing ... I think it is just for practice. If you want to display the result of a method it is generally better to call a display method from that method rather than from the main. Otherwise you end up having to type out System.out.println(methodName()); every time instead of just methodName();
carlos oliveira
Level 10 , Seattle, United States
28 February 2019, 22:29
OMG! I was trying hours tmes 60!!!!!!! i neeeeeed a coffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee! lol
Belinda
Level 4 , Portland, United States
22 May 2020, 22:57
I did that too! So glad I checked help on third fail.