Discover the answers to your questions at Westonci.ca, where experts share their knowledge and insights with you. Connect with a community of experts ready to provide precise solutions to your questions on our user-friendly Q&A platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Implement a class Clock whose getHours and getMinutes methods return the current time at your location. (Call java.util.Date().toString() and extract the time from that string.) Also provide a getTime method that returns a string with the hours and minutes by calling the getHours and getMinutes methods. Provide a subclass WorldClock whose constructor accepts a time offset. For example, if you live in California, a new WorldClock(3) should show the time in New York, three time zones ahead. Which methods did you override? (You should not override getTime.). Add an alarm feature to the Clock class. When setAlarm(hours, minutes) is called, the clock stores the alarm. When you call getTime, and the alarm time has been reached or exceeded, return the time followed by the string "Alarm" and clear the alarm.