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
sattari [20]
3 years ago
8

Write a Java test program, named TestGuitar, to create 3different Guitars representing each representing a unique test case and

call each all of the getter methods along with the toString and playGuitar() methods and document the output. Forexample for a Guitarwith 7strings,length of 30.2,manufactured by Fender with a color of Black, the output may look similar to this:
Computers and Technology
1 answer:
alina1380 [7]3 years ago
4 0

Answer:

Explanation:

//Guitar.java

import java.awt.Color;

import java.lang.reflect.Field;

import java.util.Random;

public class Guitar

     /**

     * these two fields are used to generate random note and duration

     */

     static char[] validNotes = 'A', 'B', 'C', 'D', 'E', 'F', 'G' ;

     static double[] validDuration = 0.25, 0.5, 1, 2, 4 ;

     /**

     * basic guitar attributes

     */

     private int numStrings;

     private double guitarLength;

     private String guitarManufacturer;

     private Color guitarColor;

     public Guitar()

           /**

           * default constructor

           */

           numStrings = 6;

           guitarLength = 28.2;

           guitarManufacturer = Gibson;

           guitarColor = Color.RED;

     

     public Guitar(int numStrings, double guitarLength,

                 String guitarManufacturer, Color guitarColor)

           /**

           * parameterized constructor

           */

           this.numStrings = numStrings;

           this.guitarLength = guitarLength;

           this.guitarManufacturer = guitarManufacturer;

           this.guitarColor = guitarColor;

     

     /**

     * required getters and setters

     */

     public static char[] getValidNotes()

           return validNotes;

     public static void setValidNotes(char[] validNotes)

           Guitar.validNotes = validNotes;      

     public static double[] getValidDuration()

           return validDuration;

     public

You might be interested in
Alexei was given a key to a substitution cipher. The key showed that the entire alphabet was rotated 13 steps. What type of ciph
larisa [96]

Answer:

ROT13

Explanation:

8 0
3 years ago
Use the ________ property in the html link tag to to associate a web page with a style sheet for printing.
lawyer [7]
You should use the <span>media="print" link tag to achieve this. </span>
8 0
2 years ago
Where is the typical location of a touchpad inside of a laptop?
butalik [34]

Answer:

Attached to the keyboard

Explanation:

Touch pad is the type of the mouse that is located on the laptop just near the keyboard or we can say that it is attached to the keyboard of the laptop. It has almost two buttons that are used for the purpose of Left and Right Click.

The touch pad is used to move the cursor to the required position on the screen of the laptop. This will work by just moving figure on the touch pad as the cursor move on the screen in the same direction of the finger..

5 0
3 years ago
Is backing up computer files done on the hard drive?
melomori [17]
Yes I believe so 

It should be acked up on the hard drive
7 0
3 years ago
Which app or website teaches java and phyton
aev [14]

Microsoft is a website that teaches java and phyton

6 0
3 years ago
Other questions:
  • What might be the best response to a cyberbuly attack
    6·2 answers
  • List and define the types of System Software. How does System Software differ from Applications Software?
    12·1 answer
  • During the past decade ocean levels have been rising faster than in the past, an average of approximately 3.1 millimeters per ye
    14·1 answer
  • What is the preferred procedure for putting customers on hold​
    13·2 answers
  • In regard to protective actions for explosive devices, the area where the blast originates is referred to as ___________ perimet
    8·1 answer
  • If there is a slow internet connection or limited access to certain sites it is often better to _________ a video file before st
    9·2 answers
  • PLS ANSWER ASAP!
    9·1 answer
  • Select one or more of the following: Which of these events will cause signal(s) to be generated by the kernel (the operating sys
    6·1 answer
  • Which type of file can be opened directly into Excel?
    15·1 answer
  • KAPWING Video Editing Software allows you to use existing You Tube Videos in your design.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!