Write a java client by using arraylists, JAVA Programming

1. The purpose of this problem is to practice using ArrayLists.Write a Java client file containing a mainmethod plus other methods as needed to solve the following problem (no class definition file is to be used).(remember to solve this problem by calling a number of methods, rather than writing large code segments)

  • Generate 30 random numbers between 1 and 1000 inclusive and store these in 2 different ArrayListssimultaneouslyas described below
    1. each ArrayList should be created using the default size (of 10)
    2. the first ArrayList should hold the random numbers in the order they are generated (so it will need to automatically expand to accommodate the data)
    3. the second ArrayList should hold the random numbers in sorted order. This will be accomplished by inserting each element as it is generated into the second ArrayList using a modified version of the insertion sort code we studied in class

a. make a method that contains your modified insertion sort code.  Your code should work with an ArrayList, not a Comparable[ ].

  • Display the 2 ArrayLists, hopefully demonstrating that your modified insertion sort works (note the first arraylist will display the unsorted data, while the 2ndarraylist should be sorted)
  • create another method that will perform a selection sort on an arraylist and send it the first (unsorted) arraylist. This method should contain a modified version of the selection sort code we discussed in class; the code is modified to use an arraylist rather than a comparable[ ].
Posted Date: 3/21/2013 2:13:25 AM | Location : United States







Related Discussions:- Write a java client by using arraylists, Assignment Help, Ask Question on Write a java client by using arraylists, Get Answer, Expert's Help, Write a java client by using arraylists Discussions

Write discussion on Write a java client by using arraylists
Your posts are moderated
Related Questions
Write a program of student Using a Class Objects of a class are always created on heap using "new" operator followed by constructor Student s = new Student ( ); // no po

This assignment is a good project for working with 2 dimensional arrays. In this program, you will implement an ascii version of the classic game "Connect 4". Connect 4 is a 2 p

I want Software Tool for Sequential Circuit Analysis The output of the program could be both graphical for the diagram and the rest is console. Skills required: C++ Progra

Develop Student Portal Project Description: Technology to be used: Java, Portlets, Liferay, functions in Oracle DB, Boostrap. We need develop two pages, a header and foote

Data integrity helps to make sure if something is communicate and not tampered with in the mean while when transmission take place. Checksums: Simply inserts the bytes withi

You are asked to write a Java program to calculate the commercial value of the stamps owned by a philatelist. Each philatelist has a name and a collection of stamps. The stamps can

Question 1: (a) Describe two reasons driving the termination of processes. (b) Discuss the five main steps the OS would implement once it has decided to create a new proc

How to Write Exception Subclasses ? Most exception subclasses inherit all their functionality from the superclass. Each subclass majorly serves as a marker for a various types

I want Android App Notes Project Description: Seeking a developer to create a simple note application I don't need all the visualize features. I just want the user to t

Spring configuration file is an XML file. This file having the classes information and defines how these classes are configured and introduced to each other.