MyLab Programming with Pearson eText -- Access Code Card -- for Java How to Program, Early Objects
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
Classes, objects, instantiation, inheritance, encapsulation, and polymorphism are all object-related concepts that will help us understand how the OOP paradigm is used in coding. a.) In your own words discuss one or more of these concepts.
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) Question 1 Explain the answer step-by-step and include verbal explanation. Thank you!    What is the difference between an interface and an abstract class? What advantage does an interface offer over an abstract class?

Chapter 1 Solutions

MyLab Programming with Pearson eText -- Access Code Card -- for Java How to Program, Early Objects

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