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
arlik [135]
3 years ago
12

For the given program, how many print statements will execute? public static void printShippingCharge(double weight) { if((weigh

t > 0.0) && (weight <= 10.0)){ System.out.println(weight * 0.75); } else if((weight > 10.0) && (weight <= 15.0)) { System.out.println(itemWeight * 0.85); } else if((weight > 15.0) && (weight <= 20.0)) { System.out.println(itemWeight * 0.95); } } public static void main(String args[]) { printShippingCharge(18); printShippingCharge(6); printShippingCharge(25); }
Computers and Technology
1 answer:
Step2247 [10]3 years ago
4 0

CORRECT QUESTION:

For the given program, how many print statements will execute?

public static void printShippingCharge(double weight) { if((weight > 0.0) && (weight <= 10.0)){ System.out.println(weight * 0.75); }

else if((weight > 10.0) && (weight <= 15.0)) { System.out.println(weight * 0.85); }

else if((weight > 15.0) && (weight <= 20.0)) { System.out.println(weight * 0.95); } }

public static void main(String args[]) {

printShippingCharge(18);

printShippingCharge(6);

printShippingCharge(25); }

Answer:

Two of the print statements will output values

Explanation:

These two calls to the printShippingCharge are the ones that will output values: printShippingCharge(18); and printShippingCharge(6);

The first if statement is true when the value of weight is 6 (weight > 0.0) && (weight <= 10.0)

The Third if statement  is true when weight is 18 (weight > 15.0) && (weight <= 20.0)

NOTE: That I made correction to the variable weight. The question isn't consistent with the variable name. It used weight and itemWeight at different points this will lead to a compiller error

You might be interested in
Characteristics of partial copy sandboxes versus full sandboxes? choose 2 answers
svet-max [94.6K]

The main dfifference is a Partial Copy Sandbox only copies a selection of your data.

What are partial copy sandboxes and full sandboxes?

To test new configurations with your own real data, a partial copy sandbox duplicates your configuration and some (but not all) of your data. A Partial Copy Sandbox just replicates a portion of your data, as opposed to a Full Sandbox, which duplicates all of your data and is an exact replica of your production organization.

  • While a Partial Copy Sandbox can be renewed every 5 days, a Full Sandbox can only be refreshed every 29 days.
  • On creation or refresh, a Partial Copy Sandbox copies only sample data; in contrast, a Full Sandbox copies all data.
  • In addition to the overall data storage restriction, the 5GB file storage limit is different for a Partial Copy Sandbox.

To learn more about sandboxes click on the link below:

brainly.com/question/20436561

#SPJ4

6 0
2 years ago
use the internet to research the SYSTEM account. Why is it nessesary to include this account with full control on a directory
Kobotan [32]

Answer:

It is essential for the existence of a helicopter administration over all other users on the system.

 

Explanation:

A system account is a computer user account that is generated by an operating system (OS) during installation of the OS and that is utilized by the user in accordance to the parameters with which it has been designed and the purpose which it was created.

A System account is usually referred to as a privileged account because it comes with full control on one or more directories. A directory is simply a location for file storage on a computer. Full access or control includes the ability to:

  1. read directories
  2. write to directories
  3. make changes to and delete files, folder and subfolders.
  4. alter authorization settings for all files and subdirectories.

Besides control on the directory level, System Accounts which are also called Super Accounts which in addition to the above have permission to

  • install  and remove software applications
  • update and or upgrade the computers operating system
  • access directories and files which normal users cannot and should not.

System Accounts are therefore important for security reasons. They are configured to act as a supervisory account which can create, authorise and terminate other accounts and processes.

Some of their merits include the ability to:

  1. Oversee, audit, and completely control all other privileges.
  2. forestall cyber attacks on the system from internal users or insiders.
  3. Establish and provide evidence for compliance with regulatory codes

Cheers

8 0
3 years ago
________ is a markup language that allows for tagging selected elements of the content of documents for their meanings and is us
trasher [3.6K]

Answer:

E)nXML

Explanation:

XML is a short for Extensible Markup Language. It is a markup language like the Hypertext markup language (HTML) and are both used in the development of web applications. However while the HTML describes the content of the Web page that is the graphics, images and videos and how they are displayed, the XML handles the description of data and information formats, their storage and the transportation and sharing over the internet.

4 0
3 years ago
Read 2 more answers
What is the purpose of a web server? What is the purpose of a web browser?
Sauron [17]

Answer: the purpose of a web browser is to help answer and needed questions, and to get to sites.

Explanation:

4 0
2 years ago
In 1839, Talbot released the paper-based process which he called _ to the public.
vlabodo [156]

Answer:

I'm pretty sure it's photogenic drawing.

7 0
3 years ago
Other questions:
  • A program is run line by line to determine the source of a logic error. Which best describes the specific tool being used? (A.)c
    5·1 answer
  • In one to two sentences, explain how to save a new document.
    15·2 answers
  • In PHP, the only way to output text is with echo.
    10·1 answer
  • What advantage does digital storytelling have over oral storytelling traditions?
    6·1 answer
  • The velocity dimension of Big Data refers to _____.
    15·1 answer
  • Which platform is the best? (X-box, PC, Playstation, Nintendo Switch, Wii)
    10·1 answer
  • One major challenge in developing an international information system is to find​ a(n) ________ when there is so much cultural a
    11·1 answer
  • ____ a British mathematician devolved the concept of a programmable digital computer and worked with Ada Lovelace to design the
    13·1 answer
  • PLEASE HELP WILLL GIVE BRAINLIESTTTTT!
    13·2 answers
  • Which term refers to a shorthand method for identifying network and host bits in an ip address?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!