Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
11th Edition
ISBN: 9780134743356
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 1, Problem 5E

Explanation of Solution

Object

  • Depending on whether it is mechanical or electronic watch, there will be different design for power source location, watch casing, hands and watch protection.
  • The user check out from watch is position of its hands to read time.
  • The rest of watch’s functioning is encapsulated within the casing.
  • Before time of a watch is read, it must have been constructed from its engineer’s drawings or design plans.

Attributes

  • Apart from the ability to read time, it has attributes such as color, constituent material, power source and extra properties such as water resistant, size, its ability to keep track of date and month.
  • The watch’s attributes are representing part of its design in its engineering diagrams.
  • Every watch will maintain its own attributes.

Behavior

  • For a mechanical watch, the behavior or method hides the hand and wheel movement mechanism from the watch.
  • Behavior and method are similar terms.
  • Behavior house the same way as watch perform its tasks.

Class

  • A class is used to embody a set of methods that aid in performing class’s tasks.
  • A class can be seen as blueprints and in the case of watch, the engineering drawings or design plan from which watch class is created.
  • It will hence contain methods for reading, changing time and so on.

Inheritance

  • With inheritance, a new class can be created from the existing class.
  • The new class absorbs the characteristics of the existing class.
  • Alarm clock may contain general watch characteristics such as hands and timing parameters but at the same time it may have an extra customized alarm device...

Blurred answer
Students have asked these similar questions
You are probably wearing on your wrist one of the most commontypes of objects—a 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 alarmclock), messages, encapsulation and information hiding.
Java One of the world’s most common objects is a wrist watch. Discusshow each of the following terms and concepts applies to the notion of awatch: object, attributes, behaviors, class, inheritance (consider, forexample, an alarm clock), modeling, messages, encapsulation, interfaceand information hiding.
Wristwatches are one of the world's most well recognised things. To understand a watch, consider the following terminology and concepts: Modeling, messaging, encapsulation, interface, and information hiding are some examples of these concepts, as are objects, attributes, behaviours, classes, and inheritance.

Chapter 1 Solutions

Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education