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
Which of the following sentences is accurate? a. PDF stands for "Proofreading Direct Files." b. PDF files cannot be edited. c. B
olga_2 [115]

Answer: Option (c) is correct

Explanation:

PDF is portable document format that come in form of file format .It is used for sharing and transmitting between computing and operating systems for viewing and printing in actual page layout. They can be used fro eBooks ,scanned document and text etc.

  • Other options are incorrect because not all business organization use PDF, PDF has the capability of being edited and it stands for "portable document format".
  • Thus, the correct option is option(c)
8 0
3 years ago
The columns of a spreadsheet data source are A. form letters. B. the mailing list. C. data points. D. fields.
mojhsa [17]

I believe it is C, I'm so sorry if im incorrect.

8 0
2 years ago
What are the primary benefits of relying on systems development standards?
Sunny_sXe [5.5K]

Answer:

The benefits of relying on System Development Standards is explained below.

Explanation:

There are many benefits of having a Well Defined Systems Development. It helps in having a pre - planned and well defined structure before the project starts. It helps in having a Clear view of the whole project and also each phase of the whole System Development. It helps in having an understanding of cost required and the revenues generated at each phase of the whole system development. It helps in having an understanding of the goal of each phase and procedures need to be followed for that particular goal. It also helps in having the quality checked and the improvements need to be made for the desired quality.

3 0
2 years ago
Does C supports STRINGS as a data type?
Nat2105 [25]

Answer:

C language does not support strings as a data type. A string is actually one-dimensional array of characters in C language. These are often used to create meaningful and readable programs.

Explanation:

6 0
1 year ago
Which of the following is not a basic role of a webmaster
Natalija [7]
Out of the following, the only one that I see is not the basic role of a webmaster is replying to customers questions about the web site! Usually they have a specific job for that; like customer service etc. Hopefully that helps.
5 0
3 years ago
Other questions:
  • Internally, computers are constructed from circuitry that consists of small on/off switches. What is the most basic circuitry-le
    12·1 answer
  • When I try to invite someone to be my friend on brainly, for some people, it says, "Somethings up. Invitation wasn't sent". Can
    8·1 answer
  • What are the features of Cobol language that make it suitable for programming business applications.
    6·1 answer
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    5·1 answer
  • Vendors who use open source as part of their product offerings can expect to bring new products to the market faster because: Gr
    11·1 answer
  • Please select the word from the list that best fits the definition Asking for review material for a test
    14·2 answers
  • Computer simulations were first developed during __________<br> as a part of the _____________
    5·1 answer
  • What do you call the quality of information
    5·1 answer
  • The _____ of a story describes the time and location of a story.
    5·2 answers
  • You are a software engineer at a company where management routinely encourages you and your colleagues to use pirated software.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!