1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
xxTIMURxx [149]
3 years ago
7

Given main() and the Instrument class, define a derived class, StringInstrument, for string instruments.

Computers and Technology
1 answer:
Ostrovityanka [42]3 years ago
3 0

Answer:

Explanation:

The following derived class called StringInstrument extends the Instrument class and creates the necessary private variables for number of Strings and number of Frets. Then it creates getter and setter methods for each of the variables. This allows them to be called within the main method that has already been created and output the exact sample output as seen in the question.

class StringInstrument extends Instrument {

   private  int numStrings, numFrets;

   public int getNumOfStrings() {

       return numStrings;

   }

   public void setNumOfStrings(int numStrings) {

       this.numStrings = numStrings;

   }

   public int getNumOfFrets() {

       return numFrets;

   }

   public void setNumOfFrets(int numFrets) {

       this.numFrets = numFrets;

   }

}

You might be interested in
You want to average the numbers in the range b1:b30. you have named this range of cells data and wish to use this range name in
Nezavi [6.7K]
Hello  <span>JkgamingFTW6220</span><span>


Answer: You want to average the numbers in the range b1:b30. you have named this range of cells data and wish to use this range name in your formula. after typing average( you should select the f3 key.


Hope This Helps!
-Chris</span>
5 0
4 years ago
What does the somaliland high population density <br>​
erma4kov [3.2K]

Explanation:

Somalia ranks number 73 in the list of countries (and dependencies) by population. The population density in Somalia is 25 per Km2 (66 people per mi2).

5 0
3 years ago
What might happen if a computer has too many applications running at one time?
nadya68 [22]

Answer:

b freeze or run slowly

Explanation:

6 0
3 years ago
WHAT is the USE OF RIBBON TAB​
kifflom [539]
A command bar that organizes a program's features into a series of tabs
6 0
3 years ago
Which statement identifies what the students will be graded on?
Tju [1.3M]
A, although I may be wrong.
5 0
4 years ago
Read 2 more answers
Other questions:
  • Colours in art packages are often given Hex codes as illustrated below with #00ccff. Why is Hex used in this way rather than the
    11·1 answer
  • Which of the following represent features of
    6·1 answer
  • Extended ACLs can filter traffic based on _____. (Points : 3) protocol type
    8·1 answer
  • The design of computers, devices, and media in a network is categorized as either client/server or peer-to-peer. what is the ter
    8·1 answer
  • Which remote assistance option requires peer name resolution protocol (pnr) and ipv6?
    5·1 answer
  • Text can be inserted into a presentation by
    7·1 answer
  • A presentation is widely used to present ______ and ______ effectively​
    12·1 answer
  • D. Chipboard
    14·1 answer
  • Difference between tell() and seek().​
    11·1 answer
  • Tristan just downloaded a new game he wants to play on his computer. What kind of file should he open in order to install and ru
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!