Write a method in your class called reversearray

Assignment Help Computer Engineering
Reference no: EM132169203

Using JAVA

Array Exercises: Create a class named ArrayExercises that contains the following array tasks in the main method:

1. Write some code that asks the user to enter an integer via the keyboard, use that integer to set the length of an array and populate it with random integers from -17 to 19 (inclusive). Print the array back in a nice way (10 numbers per line with commas and such);

2. Below that write some java to reverse the arrays:

char[] a = {'t', 'o', 'y', 'o', 't', 'a'} char[] b = {'r', 'a', 'c', 'e', 'c', 'a', 'r'}

You should do this by creating new arrays to store the reversal. Then write some more java code to prove to me that array b contains a palindrome, while array a does not.

3. (Challenge:) Write a method in your class called reverseArray that is of void return type and it takes as argument a String array (any String array the teacher can think of!) and it reverses the given array in place. That is, it manipulates the given array and modifies it.

Reference no: EM132169203

Questions Cloud

Draw a line using point draw and bresenhams line algorithm : To program a graphics program the first thing to consider is the display window (or canvas) itself. This is specified and implemented using library functions.
Set the length of an array and populate it with random int : Write some code that asks the user to enter an integer via the keyboard, use that integer to set the length of an array and populate it with random integers.
Create an erd crows foot diagram showing the entities : Create an ERD crows foot diagram showing the entities and the relationships between them with cardinalities.
Define the image as a matrix a using the imread function : Define the image as a matrix a using the imread function. What is the height and width in pixels?
Write a method in your class called reversearray : Write some code that asks the user to enter an integer via the keyboard, use that integer to set the length of an array and populate.
Design a vending machine that takes coins : Design a vending machine that takes coins of 1, 5, 10, and 25 cents. Ask the user what he wants to purchase, by selecting for a Coke.
Write a program in java with pseudocode using the io module : The user puts some money into a savings account. Each month, they might (or might not) make a deposit into that account.
Create an external style sheet for your index page : Create an external style sheet for your index page. Make the headings sans-serif and centered. Make the headings sans-serif, italic.
What design modifications will need to be considered : What diversity accommodations, for potential users visiting your selected city, will you design for in addition to skill levels and age demographic?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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