subject

Melissa is updating her class Cell. She has written the following code, but it will not compile. Where is her error? public class Cell
{
private int chromosomes, rna;
public double time, h2o;
private static int cellCount = 0;
private static double mCount = 4.0;

public Cell()
{
chromosomes = 23;
rna = 1;
h20 = 2.0;

cellCount++;
System. out. println(“There are now ” + cellCount + “ cells”);
}

public Cell(int a_chromosomes, int a_rna, double a_h20)
{
chromosomes = a_chromosomes;
rna = a_rna;
this();
h20 = a_h20;

cellCount++;
System. out. println(“There are now ” + cellCount + “ cells”);
}

public void printInfo() {
System. out. println(“chromosomes: ” + chromosomes);
System. out. println(“rna: ” + rna);
System. out. println(“h2o: ” + h2o);
}

public int getChromosomes()
{
if (chromosomes < 1) {
throw new IllegalArgumentException(“chromosom es is less than 1”);
}
return chromosomes;
}

public double get_mCount()
{
return mCount;
}
}
Reset

A. chromosomes = a_chromosomes;
B. this();
C. cellCount++;
D. return chromosomes;

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:30, relic7391
Is a string of code written to hurt others by damaging or destroying
Answers: 1
image
Computers and Technology, 23.06.2019 06:40, euniceyi56
How many nibbles can be stored in a 16-bit word?
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, seaotter7140
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, yanicas
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
You know the right answer?
Melissa is updating her class Cell. She has written the following code, but it will not compile. Whe...

Questions in other subjects: