Java One of the world’s most common objects is a wrist watch. Discuss how each of the following terms and concepts applies to the notion of a watch: object, attributes, behaviors, class, inheritance (consider, for example, an alarm clock), modeling, messages, encapsulation, interface and information hiding.
Java
One of the world’s most common objects is a wrist watch. Discuss
how each of the following terms and concepts applies to the notion of a
watch: object, attributes, behaviors, class, inheritance (consider, for
example, an alarm clock), modeling, messages, encapsulation, interface
and information hiding.
a) Object :-
A wrist watch is constituted of different part then which together join to give us a view of what the time at a given moment is, these parts are combined together that can be called as a watch where the individual components are usually design in the form of engineering drawings or blueprints which then depends on whether we will use a mechanical or an electronic watch or we will have to make different design for the power source location, the watch casing, the hands, the watch protection.
b) Attributes:-
Their attributes are that we can read time and other attributes are its color, its constituent material (like quartz, steel), its power source (like as mechanical, solar, electronic), extra properties like as water resistant, its size, its ability to keep track of the date and month.
c) Behaviors:-
The behavior of wrist watch and method are similar names or you can say terms, hence the behaviors house the way(s) in which the watch performs its tasks. The behavior/method hides the hand and wheel movement mechanisms from the user of the watch like in mechanical watch.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps