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.
Time conversion
- 3
Locked
Comments (17)
- Popular
- New
- Old
You must be signed in to leave a comment
David
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?
0
acg.comured
14 June 2021, 16:04
ok
0
Harikrishnan B
22 September 2020, 02:23
Can someone help here to understand whats the problem here, it says requirement not met :( Thanks in Advance!
0
Harikrishnan B
22 September 2020, 02:26
False alarm guys. the method spelling was incorrect . its Resolved
+1
Usman Full Stack Developer at QA
23 June 2021, 15:57
haha happens to all of us :)
0
Edddieg
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
-
+1
MD Alice
20 June 2021, 19:47
Exactly! I forget about minutes LOL
0
Deborah Wenrich
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));
+1
Pina
7 February, 18:09
I did not understand. could you explain it to me? :(
0
Anoop Ravuri
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
0
Christian Papaleo
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().
0
Andrea
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.
+1
Clarence L Mackey
13 June 2019, 01:08
just dont forget that thing about hours, minutes, and seconds
+2
dean
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
0
mastere
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();
0
carlos oliveira
28 February 2019, 22:29
OMG! I was trying hours tmes 60!!!!!!! i neeeeeed a coffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee! lol
+1
Belinda
22 May 2020, 22:57
I did that too! So glad I checked help on third fail.
0