Question: In this question, you are expected to demonstrate the ability to Create an Object-Oriented system that gives a good representation of the real problem. Emphasis

In this question, you are expected to demonstrate the ability to Create an Object-Oriented system that gives a good representation of the real problem. Emphasis should be placed on Modelling the Code Structure to reflect the operation of the real problem, but do not neglect the correctness/completeness of both syntax and semantics.

Create a new class in java named Clock. Class Clock has the following private attributes:

* Hour (integer 1..12)

* Minutes (integer 0..59)

* Seconds (integer 0..59)

* isAM (boolean):

Class Clock supports the following public extractor/accessor methods:

* getHours()

* getMinutes()

* getSeconds()

* getIsAM()

Class Clock may be constructed in any of the following ways:

* no parameters (sets clock to midnight)

* hour and isAM specified (sets minutes and seconds to zero)

* all attributes specified

Class Clock also supports a setTime () method that sets all four attributes from argument values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!