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]
2 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]2 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
Does anyone take bca on plato
SVETLANKA909090 [29]
I do. do you need help with it?
7 0
3 years ago
Explain each kind of pointer and for what it is appropriate
ycow [4]

Answer:

Explanation:

A pointer is nothing but a memory location where data is stored. A pointer is used to access the memory location. There are various types of pointers such as a null pointer, wild pointer, void pointer and other types of pointers. ... When you want to deal different variable data type, you can use a typecast void pointer.

8 0
3 years ago
Read 2 more answers
True or False. A Windows Server 2016 that was installed in Desktop Experience mode can be converted to Server Core mode.
9966 [12]

When we install the Windows Server 2016 in Desktop Experience mode we cannot change it to Server Core mode. To change it we must uninstall it and reinstall it changing the mode (False).

<h3>What is Windows Server?</h3>

Windows Server is the name of a line of products created and marketed by the Microsoft Corporation software company.

One of its products is Windows Server 2016, this server was characterized by having two modes that were:

  • Desktop Experience
  • Server Core

However, it had the difficulty that the user could not switch between the two modes but had to uninstall and install the mode he wanted to use.

Learn more about Windows Server in: brainly.com/question/9426216

8 0
2 years ago
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
Convert the following as indicated : (120)10 = (?)2​
Nookie1986 [14]

Answer:

1111000

Explanation:

perform the following. write from right to left:

- is the number even? then write down a 0

- is the number odd? then write down a 1 and subtract 1

- divide by 2

- repeat until you reach 0.

So for 120:

120 is even, so write down a 0 and continue with 120/2=60

60 is even,  so write down a 0 and continue with 60/2=30

30 is even,  so write down a 0 and continue with 30/2=15

15 is odd,  so write down a 1 and continue with 14/2=7

7 is odd, so write down a 1 and continue with 6/2=3

3 is odd, so write down a 1 and continue with 2/2=1

1 is odd, so write down a 1 and finish with 0

4 0
2 years ago
Other questions:
  • Which function can you use to abbreviate the lengthy expression, A1+A2+A3+A3...+A19+A20?  MAX COUNT SUM ROUND
    10·2 answers
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • A system that monitors network use for potential hacking attempts and takes preventative action to block, isolate, or identify a
    11·1 answer
  • Which term describes a visual object such as a picture, a table, or a text box?
    14·2 answers
  • Im lonnnelllly........................who want to date
    11·1 answer
  • CALLING ALL DEKUS UWU
    15·2 answers
  • computer is an electronic machine that is used for data processing to produce meaningful information explain in statement​
    5·1 answer
  • Terence creates software requirements specification (SRS) documents for various software development projects. In which phase of
    6·1 answer
  • Como interactua el hardware de la computadora con el ser humano
    15·1 answer
  • Explain the measures put in place in order to maintain each of the element of computer security<br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!