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
Fiesta28 [93]
2 years ago
15

Can you structure this code in if-statements?

Computers and Technology
1 answer:
Naddika [18.5K]2 years ago
3 0
Not sure what quizScore1-5 is, but here it is. Also, I'm not entirely sure what language you're working with here, but null can't be returned as an integer. If it were a string, for example, it'd be possible as string is an object reference type.

public int getData(int dataNumber)
{
    if (dataNumber == 1)
        return quizScore1;
    else if (dataNumber == 2)
        return quizScore2;
    else if (dataNumber == 3)
        return quizScore3;
    else if (dataNumber == 4)
        return quizScore4;
    else if (dataNumber == 5)
        return quizScore5;
    else
        return 0;
}
You might be interested in
I
Naily [24]

Answer:

True

Explanation:

Not(False) OR False = True OR False = True

4 0
3 years ago
Consider a system that uses a 32-bit unique salt where users have a 4-digit number as a password (e.g. 6813). Eve wants to crack
Alenkasestr [34]

Answer:

18000 seconds or 300 minutes.

Explanation:

In the example given in the question, it is stated that the system uses 32-bit unique salt which is equal to 4 bytes where every digit takes up 1 byte thus forming the 4 digit passwords.

Considering that the passwords are 4 digits, starting from 1000 and up to 9999, there are 9000 possible password combinations.

If Eve has to go through the whole range of possible password combinations and it takes her 1 second to guess 1 password. Then in the worst case scenario, it would take her 18000 seconds or 300 minutes to crack both accounts, assuming that it is possible for them to use the same passwords.

I hope this answer helps.

6 0
2 years ago
Read 2 more answers
A small, electronic chip that a manufacturer develops for use in another product (such as a digital camera or microwave oven) is
Phantasy [73]

Answer:

The correct answer to the following question will be "Embedded Chip".

Explanation:

  • Embedded devices are a CPU chip positioned in a system that supports to improve the process. They are frequently confused with microprocessors, need other external elements, such as embedded storage and peripheral interfaces, to execute their specified tasks.
  • A thin, electronic device produced by the manufacturer to be used in another device is named as Embedded Chips.

Therefore, Embedded chips are the right answer.

3 0
3 years ago
Read 2 more answers
Computers are often referred to as _____.
GalinKa [24]
Smart machines I'm pretty sure
4 0
2 years ago
When saving a memo you created in Word, which of the following extensions is automatically assigned to the document?
Lena [83]
.docx is the default file extension on a Word doc.
6 0
3 years ago
Read 2 more answers
Other questions:
  • A graph of an organization'snet income over the past 10 years is an example of an analogmodel.
    7·1 answer
  • Most Internet users access commercial websites, which have higher-quality information because of higher editing standards and th
    12·1 answer
  • Suppose you are given a data set consisting of nominal attributes, such as color, which takes values such as red, blue, green et
    9·1 answer
  • What is the value of i printed? j = i = 1 i += j + j * 5 print("What is i?", i)
    11·1 answer
  • Which of the following is the answer?
    5·1 answer
  • In terms of technology, wich of the four devices is the most recent?
    7·1 answer
  • In a swap you need a variable so that one of the values is not lost ? Need help
    7·2 answers
  • Please help i only have 20 minuets
    5·1 answer
  • You have a team member on a remote project who is not fluent in English and
    15·1 answer
  • Please Answer ASAP!!
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!