subject

The Toy class is started below. Write three constructors for this class as explained in the comments below. public class Toy
{
private String toyName;
private String toyMaker;
private double toyCost;
//default constructor
//constructor which has two String parameters
// constructor with three parameters
}
2. The Song class is provided below, but the constructors contain errors. Read the comments to determine the number of errors, then find the errors. Each line of code can have zero, one, or more than one errors. If a line of code contains errors, rewrite it correctly to the right.
public class Song
{
private String title;
private String artist;
private int trackMinutes;
private int trackSeconds;
// default constructor contains 2 errors
public void Song
{
title = artist = "";
trackMinutes = trackSeconds = 0.0;
}
// 1-arg constructor contains 5 errors
public song( title)
{
title = title;
artist = 0;
trackMinutes = "";
trackSecond = 0;
}
// 2-arg constructor contains 3 errors
public Song(String t, a)
{
t = title;
a = artist;
trackMinutes = trackSeconds = 0;
}
//4-arg constructor contains 4 errors
private Song(String t, String a, int min, int sec);
{
title = t;
artist = art;
trackMin = min;
trackSec = sec;
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:20
Geneva’s manager would like to see some additional information to make sales decisions.enter a formula in cell j4 using the if function to it whether or not the item beaded earrings should go on sale. it will go on sale if its current sales rank (in cell g4) is 8th or lower. (hint: if the cell value is greater than or equal to 8, it will go on sale.)if this condition is true, the item will go on sale. (hint: the if_true value should be “yes”.)if this condition is false, the item doesn’t need to go on sale. (hint: the if_false value should be “-”.)copy the formula created in cell j4 to the range j5: j14
Answers: 2
question
Computers and Technology, 21.06.2019 20:00
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data.
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior
Answers: 1
You know the right answer?
The Toy class is started below. Write three constructors for this class as explained in the comments...
Questions
question
Biology, 04.07.2019 11:30
question
Mathematics, 04.07.2019 11:30
question
English, 04.07.2019 11:30
question
Computers and Technology, 04.07.2019 11:30
Questions on the website: 13722360