answer.
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
yarga
4 days ago
5

Java languageThe cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.1. Declare a constant named CENTS_PER_

POUND and initialize with 25.2. Get the shipping weight from user input storing the weight into shipWeightPounds.3. Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.import java.util.Scanner;public class ShippingCalculator { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); int shipWeightPounds; int shipCostCents = 0; final int FLAT_FEE_CENTS = 75;int CENTS_PER_POUND = 25;shipWeightPounds=10;shipCostCents = (shipWeightPounds * CENTS_PER_POUND) + FLAT_FEE_CENTS; System.out.println("Weight(lb): " + shipWeightPounds); System.out.println("Flat fee(cents): " + FLAT_FEE_CENTS); System.out.println("Cents per pound: " + CENTS_PER_POUND); System.out.println("Shipping cost(cents): " + shipCostCents); }}

Computers and Technology
2 answers:
oksian1 [797]4 days ago
8 0
// Below is Java code. // Package import import java.util.*; // class definition class Main { // class main method public static void main (String[] args) throws java.lang.Exception { try{ // variables final int CENTS_PER_POUND = 25; final int FLAT_FEE_CENTS = 75; // Creating Scanner object for input Scanner sr=new Scanner(System.in); System.out.print("Enter the shipping weight:"); // input reading int shipWeightPounds=sr.nextInt(); // cost calculation int shipCostCents = (shipWeightPounds * CENTS_PER_POUND) + FLAT_FEE_CENTS; // output Weight System.out.println("shipping Weight: " + shipWeightPounds); // output flat fee System.out.println("flat fee of shipping in cents: " + FLAT_FEE_CENTS); // output cents per pound System.out.println("Cents/pound for shipping: " + CENTS_PER_POUND); // output shipping cost System.out.println("total cost of shipping in cents: " + shipCostCents); catch(Exception ex){ return;} } } // Explanation: Define two constants "CENTS_PER_POUND=25" and "FLAT_FEE_CENTS=75". Use a Scanner object to capture user input for weight. Calculate the shipping cost by multiplying the weight with cents per pound and adding the flat fee. Then, display each value.
ivann1987 [930]4 days ago
3 0
final int CENTS_PER_POUND = 25; shipWeightPounds=scnr.nextInt(); shipCostCents = ((shipWeightPounds * CENTS_PER_POUND) + FLAT_FEE_CENTS);
You might be interested in
A regional trucking company landed a contract to supply products for a major retailer. To do this, it needs to hire an IT profes
zubka84 [942]
I believe the answers are F and A
.
8 0
13 days ago
The level of the computer hierarchy where an operating system functions is the ______. digital logic level system software level
Natasha_Volkova [897]
I hold the top position in the hierarchy!
6 0
21 day ago
Read 2 more answers
1.the following code example would print the data type of x, what data type would that be?
Natasha_Volkova [897]

Answer:

x = 5, so the data type is integer (used for whole numbers)

2. The data type in question is string

3. The data type is float (used for decimal numbers)

Explanation:

6 0
1 month ago
A network administrator has received the IPv6 prefix 2001:DB8::/48 for subnetting. Assuming the administrator does not subnet in
8_murik_8 [892]

Answer:

subnets=65536

Explanation:

As per our knowledge,

--> the address's interface ID portion begins at 64

--> there exists a 48 bit network prefix

therefore,

the bits available for subnets are = 64-48=  16

thus, by utilizing 16 bits, the number of subnets can be calculated as = 2^16 = 65535

6 0
1 month ago
Provide an example by creating a short story or explanation of an instance where availability would be broken.
Amiraneli [921]

Explanation:

Personal Insurance

Understanding workplace confidentiality: Key points

In professions where you advise clients or patients, safeguarding private and sensitive information is essential. But are you knowledgeable about what constitutes a confidentiality breach and how to handle it if it happens?

This passage provides insights into protecting confidential data and identifying breaches in various jobs, emphasizing the significance of confidentiality at work.

What does a breach of confidentiality entail?

Essentially, a breach occurs when information is shared with someone without the explicit consent of its owner. This refers to the failure to respect an individual's privacy or the trust they placed in you while sharing their information.

Why is maintaining confidentiality critical?

Safeguarding confidential information is crucial for those who access or handle such data at work. If confidentiality is compromised, it can jeopardize your professional reputation and relationships with current and future clients, which may lead to termination of contracts or legal consequences.

Therapist/patient confidentiality

Confidentiality for patients is especially vital for therapists and counselors. It plays an essential role in establishing proper boundaries, fostering a trusting therapeutic relationship.

Here are some examples of unintentional breaches of therapist/patient confidentiality:

Disclosing confidential client information to friends or family

Discussing confidential details in public spaces where others can overhear

Leaving computers with confidential information accessible to others

Continuing treatment for a client with known conflicts of interest (e.g., if they are acquainted with family or friends)

When individuals give permission to share information but without clarity, it may lead to misunderstandings and potential breaches (e.g., a patient may consent to share details with a teacher but not with their doctor).

7 0
1 month ago
Other questions:
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    6·1 answer
  • In this project, you’ll create a security infrastructure design document for a fictional organization. The security services and
    9·1 answer
  • What are the differences between a policy, a standard, and a practice? What are the three types of security policies? Where woul
    15·1 answer
  • Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 3 8 the output is
    5·1 answer
  • A computer program is tested by 5 independent tests. If there is an error, these tests will discover it with probabilities 0.1,
    5·1 answer
  • Dairy Farm decided to ship milk in containers in the form of cubes rather than cylinders. Write a program called ws4.cpp that pr
    14·1 answer
  • Write an expression that will cause the following code to print "18 or less" if the value of user_age is 18 or less. Write only
    9·2 answers
  • Which of the following is NOT true about data?
    8·2 answers
  • An application specifies a requirement of 200 GB to host a database and other files. It also specifies that the storage environm
    12·1 answer
  • Sean is white hat hacker, who is demonstrating a network level session hijack attacks and as part of it, he has injected malicio
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!