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]
3 years ago
15

Can you structure this code in if-statements?

Computers and Technology
1 answer:
Naddika [18.5K]3 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
The purpose of​ a/an _________ system is to capture best practice solutions and program them into a set of rules in a software p
Dmitriy789 [7]
The purpose of an expert system is to capture best practice solutions and program them into a set of rules in a software program. Expert systems are computers that use artificial intelligence technologies to simulate a behavior of a human or another subject. 
The knowledge about a specific subject is transformed with this system into a software code. 
8 0
3 years ago
Select all that apply.
professor190 [17]
Social worker and legal aid worker

4 0
3 years ago
Read 2 more answers
Explain which are of the brain you think might light up to show that you are telling a lie and why
agasfer [191]
The left side because the right side of the brain handles stuff more on the line of shapes and objects
6 0
3 years ago
Pls someone help me with these four questions
ipn [44]

Answer:

16. Grace Hopper. 1959.

8 0
3 years ago
What are the two compatibility issues that may arise between computer systems while transferring presentations? different video
Mamont248 [21]

Different video files and operating system versions can cause compatibility issues to arise between computer systems.

Since, file formats and operating systems may not be compatible with each other. For example, earlier versions of Windows may not be able to play certain types of video files due to the codecs used to encode them.

<h3>Importance of compatibility between operating system computer systems</h3>

Compatibility between operating systems is important because it allows different computer systems to interact and share resources. This includes sharing of programs, files, and data.

Compatibility also allows users to access applications and services on different platforms. It also enables efficient use of hardware and software resources, as well as efficient use of resources in a network. Compatibility also ensures that computer systems can communicate with each other and can access the same resources. Without compatibility, it would be difficult for computer systems to interact with each other.

What are two compatibility issues that may arise between computer systems while transferring presentations? (Fill in the blank).

Different video files and _____ can cause compatibility issues to arise between computer systems.

Learn more about Compatibility between operating systems:

brainly.com/question/24760752

#SPJ4

4 0
1 year ago
Other questions:
  • 6. An art museum owns a large volume of works of art. Each work of art is described by an item code (identifier), title, type, a
    6·1 answer
  • Is it just me or is brainly not working right now? I am trying to add friends and it won't let me!
    5·2 answers
  • Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha
    14·1 answer
  • The growing network of physical objects that will have sensors connected to the Internet is referred to as the ________.
    13·1 answer
  • ___ design uses the same webpage content, but applies styling depending on the viewport size of the device
    11·1 answer
  • Question #5
    15·2 answers
  • Fill in the blank with the correct term.
    10·2 answers
  • Cómo fue posible que los alemanes exterminando seres humanos​
    11·1 answer
  • What is the first things u do upon seeing this sheet?​
    14·2 answers
  • 5. Write the name of the tab, command group, and icon you need to use to access the
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!