Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Please help with this java program I have been working on it for 3 day

Please help with this java program I have been working on it for 3 day and cant seem to get it right.

import java.util.Scanner;import java.awt.Color;import java.util.Random.nextInt;import java.util.Case;import java.util.Color;/**File: Guitar.java*Author: Kerri Batze*Date: 17-11-2017*Program: This program will do this*/public class Guitar {private int numStrings;private double guitarLength;private String guitarManufacturer;private Color guitarColor;{this.numStrings = 6;this.guitarLength = 28.2;this.guitarManufacturer = “Gibson”;this.guitarColor = Color.RED;return this;}public Guitar constructor;int strings,guitarLength,guitarManufacturer,guitarColor;{this.numStrings = strings;this.guitarLength = length;this.guitarManufacturer = manufacturer;this.guitarColor = color;return this;}//returns number of stringspublic int getnumStrings(){return this.numStrings;}//returns lengthpublic double getguitarLength(){return this.guitarLength;}//returns manufacturerpublic String getguitarManufacturer(){return this.guitarManufacturer;}//returns colorpublic Color getguitarColor(){return this.guitarColor;}//play 16 random notespublic String playGuitar( ){String play = “[“;char [] notes = {‘A’,’B’,’C’,’D’,’E’,’F’,’G’};double[] duration = {0.25,0.5,1,2,4};int a;int b;Random rand = new Random();System.out.print(“[“);for (int i=0;i<16;i++){
Background image of page 1
a = rand.nextInt(7);b = rand.nextInt(5);play=play + notes[a] + “(” + String.valueOf(duraation[b]) +“)”;if (i!=15) play = play + “,”;}play = play + ‘]’;return play;}public string toString() {String infoString = “(numStrings=”+this.numStrings+”,Length=”+this.guitarLength+”, manufacturer=”+this.guitarManufacturer+”,color=”+this.guitarColor+”)”;return infoString;}Switch (rand.nextInt(5)){case 0:System.out.print(“0.25”);break;case 1 : System.out.print(“0.5”);break;case 2 : System.out.print(“1”);break;case 3 : System.out.print(“2”);break;case 4 : System.out.print(“4”);break;System.out.print(“)”);if (i < 15)System.out.print(“,”);}}
Background image of page 2

Step-

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"