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
If you implement a Wireless LAN (WLAN) to support connectivity for laptops in the Workstation Domain, which domain does WLAN fal
777dan777 [17]

Answer:

The WLAN would fall within the LAN Domain.

Explanation:

<em>Because, the domain that you would need to implement web content filters would be the LAN-WAN. Reason being that the LAN-WAN needs the web content filters in order to filter the data that is coming in from outside of the network and to allow good data to be able to be passed back and forth.</em>

4 0
3 years ago
Who does COPPA protect?
Juliette [100K]

Answer:

COPPA(Children's Online Privacy Protection Act) was the act introduced in the year 1998, which was made for the online privacy regulations of the children who were under the age of 13 years.

COPPA was made for the protection of the children from being abused and humiliated through the means of online sources. COPPA is also governed by the Federal trade commission and helps to protect it

5 0
3 years ago
Read 2 more answers
Megapixels are used to measure which photographic element?
MakcuM [25]

Answer:

resolution of photographs it produces

Explanation:

3 0
1 year ago
What are scientific theories and laws developed
vladimir1956 [14]

Answer:

In general, a scientific law is the description of an observed phenomenon. It doesn't explain why the phenomenon exists or what causes it. The explanation of a phenomenon is called a scientific theory. It is a misconception that theories turn into laws with enough research.

Explanation:

8 0
3 years ago
Select the correct statement(s) regarding IP addressing.
natima [27]

Answer:

the answer is B

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • __________ delivers a comprehensive and accurate graphical overview of key performance indicators, often using a single screen.
    6·1 answer
  • If there is a mistake with one of your bank accounts, who should you contact to resolve the issue
    14·1 answer
  • How to make logo black and white in paint?
    14·1 answer
  • Lucy wants to develop a web page to display her profile. She wants to just start with a basic page that lists her accomplishment
    13·1 answer
  • Which of the following is an example of new and emerging classes of software?
    11·1 answer
  • You work as an IT Technician for uCertify Inc. David, a user, has recently purchased a laptop computer. He is now complaining th
    14·1 answer
  • What two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
    7·1 answer
  • Which text format is this “The transcribed text does not include speech errors, false starts and various filler words, such as:
    15·1 answer
  • What is software infrastructure?
    15·1 answer
  • You work part-time at a computer repair store. You're building a new computer. The customer has requested two serial ATA (SATA)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!