Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a Java code NOTES we are writing Supplier code here, and notClient code. You will create a simple Main as a demonstration, When started,

write a Java code

image text in transcribed

NOTES

we are writing Supplier code here, and notClient code. You will create a simple Main as a demonstration,

When started, the Clock should show a picture of a clock face. The default time on the clock should be 12:00. Note that the clock ignores the times day portion (AM or PM).

Note the drawing of the hands and the center mounting circle (to which the hands are attached, in a physical clock).

When the time changes, clear out the center by drawing a filled circle the same color as the center of the clock face.

Draw the center hand mount. Then draw the hands, showing the correct time.getSetTimeCountshould return a count of the number of times the clock has had its time set.5

9 12 11 2 About Clock 1 10 2 The clock displays its time on a round, numbered face. The hour hand is shorter and 3 thicker than the minute hand. At right is an example showing a time of 7:45?. 8 7 5 3 Classes to Create Here is the UML Class Diagram for the objects you are to create, and how they relate to each other. You supply the data section. Please pay attention to notation (including parameter and return types); there is a lot of information present. 6 Time Main cyou figure out what goes here) ceerum DayPortion l+Timehour: Integer, minute : Integer dayPortion DayPortion) Clock +AM PM you figure out what goes here) - getHour() Integer +getMinute(): Integer |-getDayPortion) DayPortion +Clock) *getTime(): Time 1+setTimetime: Time) vgetsetTimeCount Irite der -redraw() setHourhour Integer) + setMinute(minute : Integer) -setDayPortion(dayPortion : DayPortion) +time To Hour Radians time: Time): Double +cestatic>>time ToMinute Radians time: Time): Double Static methods are for extra credit 4 More Details about Classes 4.1 Time Times consist of: 1. An integer indicating the hour 2. An integer indicating the minute 3. The part of the day, either AM or PM. This is defined in the DayPortion enumerated type. Time dotubati formattedicola 7. ODMA 1102A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions