Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA HW help thank you! Write a Child Class The class below describes an Instrument, perhaps to keep track of inventory at a store. Write

JAVA HW help thank you!

Write a Child Class

The class below describes an Instrument, perhaps to keep track of inventory at a store. Write a child class- you can choose the class. Add at least one instance data variable and include all appropriate methods. The class should also implement the Breakable interface, shown below.

public abstract class Instrument {

private double price;

public Instrument(double price) {

this.price = price;

}

public double getPrice() {

return price;

}

public void setPrice(double price) {

if(price > 0 ) {

this.price = price;

}

}

public abstract void tune();

}

public interface Breakable {

void careIntructions();

}

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

Step: 3

blur-text-image

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 Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

Question What is a secular trust?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago