Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*Java Package location Interface3D an interface that ThreeDimension implements public interface abstract methods for getX(), getY(), getZ(), and set3D() set3D() has one argument for a

*Java

Package location

  • Interface3D an interface that ThreeDimension implements
    • public interface
    • abstract methods for getX(), getY(), getZ(), and set3D()
      • set3D() has one argument for a ThreeDimension object
    • default public method distance()
      • returns the primitive double 0.0
      • one argument for a ThreeDimension object
      • prints "Default method - cannot calculate the distance to " where is the ThreeDimension
      • Example output:

Default method - cannot calculate the distance to (3, -3, 5)

//I get everything else but I don't understand how to do the instruction in bold. Are they using the same object or a different one. As for the double 0.0 can I use the return method or is something else more appropriate if it is the right move should I do it after the System.out.print? May you please help me and explain your work

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_2

Step: 3

blur-text-image_3

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions