Create a java program that manipulates an array

Assignment Help JAVA Programming
Reference no: EM132107390

For this program, use the program,ECLIPSE-NEON."
Programming Assignment #1

The assignment is to create a Java program that manipulates an array.

Step 1:

In the main method, have the user input the size of an array. Create an integer array of that size. Then call the methods outlined in the following steps.

Step 2:

Create a method with signature: public static void initArray( int [] values ) that initializes the integer array with random values between 1 and 10.

Step 3:

Create a method with signature: public static void printArray( int [] values ) that prints the array.

Step 4:

Create a method with signature: public static void squareArray( int [] values ) that prints the array with all values squared, but does NOT change the array.

Step 5:

Create a method with signature: public static void reverseArray( int [] values ) reverses the values of the array. The values of the array should be changed...

Step 6:

Create a method with signature: public static void transposeArray( int [] values ) switches each pair of the array. The values of the array should be changed.

Note: Print the array after each step... (See sample I/O)

Sample INPUT/OUTPUT:

Enter size of array: 6
Values in array are:
1 2 3 4 5 6
Values in array when squared are:
1 4 9 16 25 36
Values in array when reversed are:
6 5 4 3 2 1
Values in array when transposed are:
5 6 3 4 1 2

Reference no: EM132107390

Questions Cloud

Create an array of pointer to card that are in correct order : Shuffle a deck of cards where each card is represented by a two character string. The first character indicates the card's value and the second indicates.
Defining the variable r at the beginning of the function : Instead of declaring and defining the variable r at the beginning of the function, declare it inside the loop that uses it.
What is the probability of drawing exactly three jacks : What is the probability of drawing exactly three jacks when drawing a 5 card poker hand, without replacement, from a full deck of cards (52 total cards)?
Normal probability distribution : Fill in the blanks: The number of hours it takes for a certain metal part to wear out is assumed to be from a population with a normal probability distribution
Create a java program that manipulates an array : In the main method, have the user input the size of an array. Create an integer array of that size. Then call the methods outlined in the following steps.
Number of dots on the uppermost faces : A pair of dice is tossed and the number of dots on the uppermost faces are observed. Let X denote the random variable defined as the larger of the two numbers.
Create a person gui where the application read person file : Create a Person GUI where the application read your Person file when launching the interface.
A program to write the graph information to the screen : The first line of the file contains two integers n and m, which indicates the number of vertices and the number of edges on the graph, respectively.
What does this tell you about the shape of this distribution : The mean of this data was found to be 42, while the median was 37. What does this tell you about the shape of this distribution

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd