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
Amanda [17]
3 years ago
6

Modify the provided code file to create a workout tracking program that lets the user enter (from the console) the distance they

ran each day of the week. Store each value into an array of doubles named distances
Computers and Technology
1 answer:
koban [17]3 years ago
3 0

Answer:

  1. import java.util.Arrays;
  2. import java.util.Scanner;
  3. public class Main {
  4.    public static void main(String[] args) {
  5.        Scanner input = new Scanner(System.in);
  6.        double distances [] = new double[7];
  7.        for(int i=0; i < distances.length; i++){
  8.            System.out.print("Input running distance for day " + (i+1) + ": ");
  9.            distances[i] = input.nextDouble();
  10.        }
  11.        System.out.println(Arrays.toString(distances));
  12.    }
  13. }

Explanation:

The solution code is written in Java.

Firstly, create a Scanner object to get user input for running distance (Line 6). Next, declare a distances array and set the array size to 7 because we intend to use this array to hold running distance for 7 days per week.

Next, use the for loop that run for 7 times to repeatedly prompt user to input running distance for each day and store each value to the array distances (Line 9 -12).

At last, display the array to console terminal (Line 14).

You might be interested in
Again, consider what you believe to be the goal of performing a penetration test. Why would you worry about doing any privilege
Strike441 [17]

Answer:

Penetration monitoring is conducted based on the vulnerability evaluation (Were a susceptibility evaluated and mentioned).

Explanation:

Penetration Test

  • Penetration testing is carried out from both within (the network or application) as well as outside that aims to gain access to the system to evaluate if any suspicious activity or improper behavior is likely within the device.
  • When there are some other potential security vulnerabilities, they are all found in the integration check that involves vulnerability assessment for frameworks and checking for network management.
  • Automation of penetration testing is used to make it work better.
  • Penetration monitoring deals with the same risk evaluation correlated with a disadvantage.

Privilege escalation

  • They need to think about known vulnerabilities as the system for network management works conditional on the privilege rates. Such that, increasing user has an article has highlighted and the consumer is only allowed to control or use the resources that should be used appropriately, depending on the level of privilege.
  • If he gets elevated access then it will be a failure to have access control mechanism.

Leaving backdoors

  • The creator uses backdoors to test the system's functionality during the designing processes.
  • The loophole can be a workaround overriding the identification for all users, or a default password.
  • They would need to worry about leaving the backdoor because the backdoor.which is performed either deliberately or involuntarily will circumvent the entire security mechanism.
  • During the intrusion testing process, the both privilege increase and the escape from the gateway can be discovered due to the research being done both inside and outside the device.
  • The tester's testing phase acts as various users so that any destabilization of access may be found.
  • The tester will use all numerous methods to supersede the technique of official approval, but when there are certain backdoors, maybe he can start by pointing that out.

6 0
3 years ago
In Microsoft Windows, which of the following typically happens by default when a file is "double-clicked"
Elenna [48]
Depending on the type of file, it normally runs or opens.
4 0
3 years ago
Read 2 more answers
are the network administrator for your company. You are installing a new printer in the network. When you check the print server
melamori03 [73]

Answer:

Will have to run the net start spooler command.

Explanation:

  • The printer spooler seems to be accountable for overseeing incoming faxes that have been in effect intended for handling by the printer. Whether this device stops operating, your printer won't publish documentation as well as the machine may not notice it either.
  • To solve these problems, you'll need to run the net start spooler command using the least administrative effort.
5 0
3 years ago
What are at least three tips to taking photographs of insects? Why would following the tips help create better photographs?
Ber [7]

1) Use a good cam 2) Make sure you focus on it 3) Make sure you snap it at the right time....    I hope this helps!!!!!

7 0
3 years ago
As data travels further over a wavelength or frequency, what goes down?
LUCKY_DIMON [66]

As data travels further over a wavelength or frequency, the radiation type goes down.

<h3>What is an electromagnetic spectrum?</h3>

An electromagnetic spectrum can be defined as a range of frequencies and wavelengths into which an electromagnetic wave is distributed into.

In Science, the electromagnetic spectrum consist of the following types of energy from highest to lowest frequency and shortest to longest wavelength:

  • Gamma rays
  • X-rays
  • Ultraviolet radiation
  • Visible light
  • Infrared radiation
  • Microwaves
  • Radio waves

In this context, we can infer and logically deduce that as data travels further over a wavelength or frequency within the electromagnetic spectrum, the radiation type goes down.

Read more on electromagnetic spectrum here: brainly.com/question/23423065

#SPJ1

5 0
1 year ago
Other questions:
  • Use ________ resolution when recording human speech in an audio file.
    14·1 answer
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • In a computerized accounting system, each transaction that is analyzed must be entered by hand into the appropriate journal and
    12·2 answers
  • . String literals are surrounded by _____ quotes
    14·1 answer
  • Class CTRivers describes collection of CT rivers. It has no data, and it provides the following service methods. None of the met
    13·1 answer
  • Why do most laptops have LCD rather than OLED displays, which are found on mobile devices?
    9·1 answer
  • Select the answer that best describes the activity
    5·2 answers
  • IF YOU PLAY SURVIV&gt;IO WITH ME RIGHT NOW I WILL GIVE YOU BRAINLIEST<br> AND IM NOT KAPPING
    5·1 answer
  • *
    6·1 answer
  • Higher Order Functions used for simulations of dice rolls. Definition: An n-sided dice function takes no arguments and always re
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!