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
crimeas [40]
3 years ago
10

Complete each statement by choosing the correct answer from the drop-down menu.

Computers and Technology
1 answer:
Katena32 [7]3 years ago
7 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct matching answers for this question are given below. In this question, it is asked to identify the data type of the given scenario.

Integer short and integer long data type:

These data types can hold whole positive and negative numbers. however, you can also store positive and negative values in float and double data type also.

Boolean data type:

Boolean data type usually stores true or false values such as yer or no, true or false etc. It stores binary values i.e 1 or 0.

Float and Double data type: float and double data type can store positive and negative numbers with decimals. But, the float data type can store 4 bytes of data and sufficient for storing 7 decimal digits. while double data type has a size of 8 bytes of data and sufficient for storing 15 decimal digits.

However, for the given scenario in the question,  the float data type can accomodate these values easily.

You might be interested in
The material to be broadcast and the way it's arranged is called __________. (10 letters)
ladessa [460]

Answer:

journalism

Explanation:

7 0
3 years ago
Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the int variable
levacccp [35]

Answer:

if (pH<7.0){

          neutral=0;

          base=0;

          acid=1;

      }

      else if (pH>7.0){

          neutral=0;

          base=1;

          acid=0;

      }

      else if (pH==7.0){

          neutral=1;

          base=0;

          acid=0;

      }

Explanation:

As required by the question, if and else statements have been used to test the value of the pH and assign the apropriate values to the variables neutral, base and acid.

The code snippet below can be used to prompt the user to enter values for pH

<em>import java.util.Scanner;</em>

<em>public class pHTest {</em>

<em>   public static void main(String[] args) {</em>

<em>      Scanner scr = new Scanner(System.in);</em>

<em>       System.out.println("Enter a value for the pH");</em>

<em>       int neutral, base, acid;</em>

<em>       double pH = scr.nextDouble();</em>

<em> if (pH<7.0){</em>

<em>           neutral=0;</em>

<em>           base=0;</em>

<em>           acid=1;</em>

<em>       }</em>

<em>       else if (pH>7.0){</em>

<em>           neutral=0;</em>

<em>           base=1;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>       else if (pH==7.0){</em>

<em>           neutral=1;</em>

<em>           base=0;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>} }</em>

4 0
3 years ago
Read 2 more answers
Write the code for invoking a method named sendObject. There is one argument for this method which is of type Customer.Assume th
Dafna1 [17]

Answer:

sendObject(John_Doe)

Explanation:

To invoke a method, simply call the name of the method, followed by it's arguments in parenthesis. i.e methodname(argument).

In this case, the name of the method is sendObject and it's argument is a Customer object stored in or referenced by a variable John_Doe.

The above is true since the method is defined in the same class that calls it. Otherwise, it is not valid.

6 0
3 years ago
3. Write a program that has the user enter two Strings. Display whether the first String is less than (comes first alphabeticall
Citrus2011 [14]

Answer:

The solution code is written in Python 3

  1. firstStr = input("Enter first string: ")
  2. secondStr = input("Enter second string: ")
  3. if(firstStr < secondStr):
  4.    print("The first string comes first alphabetically.")
  5. elif(firstStr > secondStr):
  6.    print("The second string comes first alphabetically.")
  7. else:
  8.    print("The first and second string are same")

Explanation:

Firstly, prompt the user to input two strings (Line 1 - 2).

Next create if else if statement to check if the firstStr is less than, greater than or equal to the secondStr and then print the appropriate message accordingly (Line 4- 9). For example, the program display message "The first string comes first alphabetically." if it find the firstStr is less than secondStr.

4 0
3 years ago
Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Algorithm. Give an example for wh
denis-greek [22]

Answer:

Check the explanation

Explanation:

When it comes to the field of computer science and information theory, the Huffman code is a specific type of optimal prefix code that is mostly utilized for the compression of lossless data. The process and procedures of finding or using such a code proceeds by means of Huffman coding, which is an algorithm that was developed by David A.

kindly check the below image for the complete answer to your question.

8 0
3 years ago
Other questions:
  • Jorge has $300 for work he performed. He expects to spend the money in the next few weeks to buy a new bike. Which type of accou
    8·1 answer
  • Choosing firm goals for your business
    7·2 answers
  • What are the two different frequencies WiFi operates on?
    9·2 answers
  • Write a program in C which asks the user for 10 integers and prints out the biggest one.
    10·1 answer
  • Que se puede observar en el escritorio de windows
    8·1 answer
  • What is an advantage of cross-brace bridge​
    10·1 answer
  • Teniendo en cuenta la realidad mundial acerca de la pandemia, ¿cómo crees que impacta
    9·1 answer
  • What factors do network consultants consider when determining the network needs of a business? Use the space provided below to a
    6·1 answer
  • Whats your favorite .io game (example krunker.io, gawd.io)<br> (PS FWEE PTS BOIS)
    7·1 answer
  • A program with a graphical user inter-face for displaying HTML files, used to navigate the World Wide Web.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!