Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Declare an Array of data type String as an instance variable Initialize the Array. Generate a random number and use the random number as the

  • Declare an Array of data type String as an instance variable
  • Initialize the Array. Generate a random number and use the random
    number as the Array size. You do not need to add elements to the Array
    when initializing it
  • Have a method that takes a parameter and adds the parameter to the
    Array. A suitable error message must be given if the Array is full.
  • Have a method that sorts the Array.
  • Have a method that prints all of the elements in the Array.
  •  

  • Using the methods that you wrote, you must do the following in the main
    method:
  • An object of type QuestionThree
  • Use the method that you wrote to add at least five elements to the
    Array.
    ch oloments in the Array.
  • Use the method you wrote to print all of the elements in the
  • Use the method you wrote to sort the Array.
  • Use the method you wrote to print all of the elements in the Array again
    to demonstrate that the sort method you wrote successfully sorted the
    Array.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

More Books

Students also viewed these Databases questions