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
Shalnov [3]
3 years ago
14

Melissa is working on her Cell class by adding new methods. However, in her most recent version, she is receiving errors in some

of her methods. Select the header of the method that is giving her trouble.
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;
h2o = 2.0;
mCount = rna/h2o;

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

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

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 = cell_2.get_mCount()) {
return cell_1;
} else {
return cell_2;
}
}
}

A. public Cell(int a_chromosomes, int a_rna, double a_h20)
B. public int getChromosomes()
C. public double get_mCount()
D. public static Boolean getLargerCell_mCount(Cell cell_1, Cell cell_2)
Computers and Technology
1 answer:
ollegr [7]3 years ago
8 0

Answer:

mfjkdjbchbnbjnjnnbbjbjvbfbgjbbbgbnbbcbbbnmbhnmbkggkjhjgghggfgfgghhjjhjhgfcghjiokijuyfdsfghuijopiuytrdfcgvhbjklp[oiu98y7t6rdfcvbnjklpo09876rdxfcvb nmlkoiu8y7trfdxcv bnjkloi9u87tyfgvbnm,lpoi98uygvbnm,loihuuuuuuuuuujhgftr5kjihugytfrdeujbhgytfrdfghuytfgvhuytfghuytgfgtgfghyt

Explanation:

You might be interested in
What are the benefits of PowerPoint
Leto [7]
I guess you could say it offers a easier and faster way to facilitate the spread of information through visual displaying of the said information.
5 0
3 years ago
Read 2 more answers
Which of the following is a professional organization in the field of IT? Society for the Prevention of Cruelty to Animals (SPCA
Lelu [443]
(IEEE) Is the obvious answer ; no harshness meant in any way
7 0
3 years ago
Read 2 more answers
Loops are frequently used to ____; that is, to make sure it is meaningful and useful.
vitfil [10]

Loops are frequently used to<u> validate data </u>that is, to make sure it is meaningful and useful.

<h3>What are common blunders made by programmers in coding loops?</h3>

Forgetting to initialize and alter the loop control variable are common mistakes that programmers occasionally make. One set of instructions operates on multiple, separate sets of data. Initialized before joining a while loop.

<h3>What are the three steps that should occur in every loop?</h3>
  • Provide a starting value for the variable that will contain the loop.
  • Test the loop control variable to decide whether the loop body executes.
  • Alter the loop rule variable.

To learn more about Loops , refer

brainly.com/question/19344465

#SPJ4

4 0
2 years ago
JAVA PROGRAMMING
VashaNatasha [74]

Answer:

See explaination

Explanation:

import java.util.Scanner;

public class GtldValidation {

public static void main (String [ ] args) {

Scanner scnr = new Scanner(System.in);

// Define the list of valid core gTLDs

String [ ] validCoreGtld = { ".com", ".net", ".org", ".info" };

// FIXME: Define an array named validRestrictedGtld that has the names

// of the restricted domains, .biz, .name, and .pro

String [] validRestrictedGtld={".biz",".name",".pro"};

String inputName = "";

String searchName = "";

String theGtld = "";

boolean isValidDomainName = false;

boolean isCoreGtld = false;

boolean isRestrictedGtld = false;

int periodCounter = 0;

int periodPosition = 0;

int i = 0;

System.out.println("\nEnter the next domain name (<Enter> to exit): ");

inputName = scnr.nextLine();

while (inputName.length() > 0) {

searchName = inputName.toLowerCase();

isValidDomainName = false;

isCoreGtld = false;

isRestrictedGtld = false;

// Count the number of periods in the domain name

periodCounter = 0;

for (i = 0; i < searchName.length(); ++i) {

if (searchName.charAt(i) == '.') {

++periodCounter;

periodPosition = i;

}

}

// If there is exactly one period that is not at the start

// or end of searchName, check if the TLD is a core gTLD or a restricted gTLD

if ((periodCounter == 1) &&

(searchName.charAt(0) != '.') &&

(searchName.charAt(searchName.length() - 1) != '.')) {

isValidDomainName = true;

}

if (isValidDomainName) {

// Extract the Top-level Domain name starting at the period's position. Ex:

// If searchName = "example.com", the next statement extracts ".com"

theGtld = searchName.substring(periodPosition);

i = 0;

while ((i < validCoreGtld.length) && (!isCoreGtld)) {

if(theGtld.equals(validCoreGtld[i])) {

isCoreGtld = true;

}

else {

++i;

}

}

// FIXME: Check to see if the gTLD is not a core gTLD. If it is not,

// check to see whether the gTLD is a valid restricted gTLD.

// If it is, set isRestrictedGtld to true

}

System.out.print("\"" + inputName + "\" ");

if (isValidDomainName) {

System.out.print("is a valid domain name and ");

if (isCoreGtld) {

System.out.println("has a core gTLD of \"" + theGtld + "\".");

}

else if (isRestrictedGtld) {

System.out.println("has a restricted gTLD of \"" + theGtld + "\".");

}

else {

System.out.println("does not have a core gTLD."); // FIXME update message

}

}

else {

System.out.println("is not a valid domain name.");

}

System.out.println("\nEnter the next domain name (<Enter> to exit): ");

inputName = scnr.nextLine();

}

return;

}

}

8 0
3 years ago
Part 3:<br> Please answer
Levart [38]

Answer:

a) 4 processes

b) 2 resources

c) R1: 2 instances

   R2: 2 instances

d) R2

e) R1

f) R1

g) No resource

h)  R1

i) R2

j) R2

k) No

l)No deadlock

Explanation:

You need to know that the resources that are required by the processes for completion are shown by the request edge and the resources allocated are shown by the allocation edge. And thus, we can find what resources are allocated to the process, and required for the completion accordingly. And here again, the cycle is created, and hence deadlock may or may not occur. However, we see that resources have multiple instances and get freed on time. And hence, deadlock does not occur.

Like,

P4 uses R2 and free one instance of R2.

P3 then uses one instance of R2 and free R2.

P3 then uses one instance of R3 and free R3.

P1 uses one instance of R1 and free R1 one instance

P1 then uses R2 and free R2.

P2 uses R1 and free R1.

Hence, all the processes are complete and deadlock does not occur.

3 0
3 years ago
Other questions:
  • If you come to a stumbling block and can't think of any more ideas, what could you do? select all that apply 2pts.
    11·2 answers
  • When you declare a string data type, you are actually creating an object from the?
    5·1 answer
  • Whats the Sioux City school wifi?
    15·2 answers
  • What did basic elements of music look like in the Twentieth Century period?
    6·1 answer
  • 5. Drawing Conclusions If you were a person in
    10·1 answer
  • Which type of computer operating system would be best for a large corporation?
    7·2 answers
  • What is a feature of Print Preview? Fit to Document Fit to Margin Fit to Page Fit to Size
    5·2 answers
  • What is the Microsoft excel window where you work on. And it composed of three worksheet?​
    7·1 answer
  • Which symbol would be used in a flowchart to represent a connection to another part of the flowchart on the same page
    15·1 answer
  • Whats with the bot spamming customer care numbers...kinda annoying when im trying to help people.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!