

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Professor: Litman; Class: Software Engineering; Subject: Computer Science; University: Concordia University - Wisconsin; Term: Unknown 1989;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Problem Statement Computers tend to store dates and times as single numbers which represent the number of seconds or milliseconds since a particular date. Your task in this problem is to write a method whatTime, which takes an int, seconds, representing the number of seconds since midnight on some day, and returns a string formatted as "". Here, represents the number of seconds since the last complete minute ended. Each of should be an integer, with no extra leading 0's. Thus, if seconds is 0, you should return "0:0:0", while if seconds is 3661, you should return "1:1:1". Definition Class: Time Method: whatTime Parameters: int Returns: string Method signature: string whatTime(int seconds) (be sure your method is public) Constraints
seconds will be between 0 and 246060 - 1 = 86399, inclusive. Examples
0 Returns: "0:0:0"
3661 Returns: "1:1:1"
Returns: "1:30:36"
86399 Returns: "23:59:59"