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
Gala2k [10]
3 years ago
12

Make sure to read all of these specifications carefully. Write a function, named array_shifter, that accepts an array of doubles

and the array’s size as arguments. The function should create a new array that is one element larger than the argument array.
Computers and Technology
1 answer:
rosijanka [135]3 years ago
6 0

Answer:

import java.util.Arrays;

public class num2 {

   public static void main(String[] args) {

//Create and initialize the first array        

double [ ]arr = {3.5, 5.6, 4.5, 6.7};

// Get the length of the array

       int n = arr.length;

      //Call the method Array Shifter inside the output statement

       System.out.println(Arrays.toString(array_shifter(arr,n)));

   }

   static double [] array_shifter(double [ ] doubleArray, int n){

       double [] narr = new double[n+1];

       //Loop through from index 1

       for(int i =0; i<narr.length-1; i++){

           narr[i] = doubleArray[i];

       }

       //Put a new element at the last index

       narr[narr.length-1] = 1.1;

       return narr;

   }

}

Explanation:

This is implemented in Java

Read detailed comments in the solution

The method array_shifter creates a new array that is one element larger than the array it received as argument and returns it

You might be interested in
What patterns do you find within the fractions in the inch on the ruler?
PtichkaEL [24]

Answer:

The markings on a standard ruler represent the fractions of an inch. The markings on a ruler from the start to the 1″ mark are: 1⁄16“, 1⁄8“, 3⁄16“, 1⁄4“, 5⁄16“, 3⁄8“, 7⁄16“, 1⁄2“, 9⁄16“, 5⁄8“, 11⁄16“, 3⁄4“, 13⁄16“, 7⁄8“, 15⁄16“, and 1”.

8 0
3 years ago
Pls help!!
alexira [117]

Answer:

4.24

Explanation:

First you find the mean of the data set, which is 7. Then to find standard deviation you have to follow the formula which tells you to subtract the mean from each number under the square root : √(2 - 7)^2 + (9 - 7)^2 + (10 - 7)^2 + (4 - 7)^2 + (8 - 7)^2 + (4 - 7)^2 + (12 - 7). Once you solve the parenthesis you square it, once you square it the negatives won't matter. That will leave you with this : √(25 + 4 + 9 + 9 + 25). The formula tells you to find the sum of those numbers (which is 72) then subtract one from how many numbers there are, 5 - 1 = 4, and divide your sum by that number. So 72 / 4 = 18. Then you find the square root of 18 and that becomes your answer.

7 0
2 years ago
Why does Phone Manufacturers make more than FHD Screen?
Ulleksa [173]
Phone screens are smaller, but are apparently more HD than a full, widescreen TV. Why? The pixels are small but they can fit in just that little screen space, but is harder to fit onto a relatively gigantic TV screen.
5 0
3 years ago
Federal law requires safety training before workers or students enter the work area.
otez555 [7]

It is True.

According to federal laws in the U.S, an employer is required by law to provide training to all employees. The employees should acquire this knowledge and understanding and any skills necessary for the performance of the duties. The employer is also required to certify that the training has been accomplished.


8 0
4 years ago
Younger people today are often called __________ because they have never known life without the Internet and cell phones.
iVinArrow [24]

Answer:

Digital Native

Explanation:

Digital natives are comfortable in the digital age, because they grew up using technology,  Digital natives are the opposite of digital immigrants, they have been interacting with technology from childhood.Digital natives see everyone on the equal level and are not dividing the world into hierarchies, they view the world horizontally. They cross boundaries and embrace the benefits of sharing with each other. Those values exist because of what they are driven by. Because of interacting with technology, digital natives think and process information fundamentally differently.

3 0
3 years ago
Other questions:
  • You are entering command that operates on a file. The path to the file is lengthy and confusing and you are afraid that you will
    12·1 answer
  • What is online school like 3 sentences
    8·2 answers
  • Done through Block Py/ Python
    11·1 answer
  • In a Web-based database, middleware is used to transfer information from the organization's internal database back to the Web se
    12·1 answer
  • What is a characteristic of tasks in Outlook?
    10·2 answers
  • Do pc players ever go outside?
    11·2 answers
  • The _____ method randomly rearranges the items in the list provided in the parentheses.
    5·2 answers
  • Why is this happening when I already uploaded files to my drive?
    13·1 answer
  • I ate five M&amp;Ms: red, green, green, red and yellow. Only these three colors are possible. I assume that p(yellow)=3p(green)
    9·1 answer
  • List one unprofessional AND one professional example of internet/social media
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!