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
how much should an organization consider moving into the cloud before full outsourcing starts making more business sense
PIT_PIT [208]

Answer:

47

Explanation:

capital steez

8 0
3 years ago
Read 2 more answers
Write an algorithm to sum to values
Elis [28]

Answer:

There is no need to make an algorithm for this simple problem. Just add the two numbers by storing in two different variables as follows:

Let a,b be two numbers.

c=a+b;

print(c);

But, if you want to find the sum of more numbers, you can use any loop like for, while or do-while as follows:

Let a be the variable where the input numbers are stored.

while(f==1)

{

printf(“Enter number”);

scanf(“Take number into the variable a”);

sum=sum+a;

printf(“Do you want to enter more numbers? 1 for yes, 0 for no”);

scanf(“Take the input into the variable f”);

}

print(Sum)

Explanation:

hi there answer is given mar me as brainliest

5 0
3 years ago
List 10 programs or applications on your computer other than any Microsoft office programs
Fofino [41]
Dropbox
Mozilla Firefox, Google Chrome
Gmail, Mozilla Thunderbird
CDburnerXP
Putty, Netflix,
Paint.net, Filezilla
3 0
3 years ago
Características que debe tener un módulo o kit tecnológico para aprender​
12345 [234]

Answer:

Multi herramientas

Explanation:

Un kit tecnologico debe contener todas las herramientas necesarias para el trabajo que lo necesites, por ejemplo destornillador magnetico con varias puntas, herramientas para desmontar y por supuesto tener buena claridad para trabajar y alcohol isoprofilico de al menos 90+ para limpiar electronicos.

5 0
2 years ago
Kayla is working on a document for her business meeting. She wants to save this document with another name. Which option should
Fittoniya [83]
Kayla could use “save as” to rename the document.
5 0
3 years ago
Other questions:
  • Isabella's manager has asked her to write up a _____ that describes their company's interest in developing a custom software sol
    13·1 answer
  • What are some things you can do with labels in Word? Check all that apply. make them include audio print them on the inside of t
    13·1 answer
  • Peter has recently bought a media player and a digital camera. He wants to buy a memory card for these devices. Which memory dev
    12·2 answers
  • How many different integers can be represented with a 4-digit number in base 13?
    8·1 answer
  • When selecting text in word, holding down the ctrl key while clicking the mouse button will select the?
    15·1 answer
  • Write a MIPS assembly language program that
    11·1 answer
  • Each tab is divided into groups of related commands or buttons. T or F
    10·1 answer
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • What are the purposes of a good web page design?
    9·2 answers
  • The ________ approach to motivation suggests a connection between internal physical states and outward behavior. achievement dri
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!