Create a menu-driven program that accept collection integers

Assignment Help JAVA Programming
Reference no: EM131396035

Java Assignment

Java

Array Sorting, Traversal and Exception Handling

Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen.

Your menu should have 6 options:

1. Add a number to the array
2. Display the mean
3. Display the median
4. Print the array to the screen
5. Print the array in reverse order
6. Quit

Program particulars:

Use an array of type int to store the integers entered by the user. There must be error checking on the input integer. If it is negative, the program will print an error message and re-prompt. This process will continue until a non-negative integer is entered. You must use a try-catch structure to trap both types of input errors (like letters where numbers should go) and range errors (like -1).

You must write your own selectionSort utility method to sort your array. Place the method in an external file named SortSearchUtil.java.

There must be error checking on the menu choice entered. If the user enters a choice not on the menu, the program will print an error message, re-display the menu and re-prompt. This process will continue until a valid option value is entered.

Your solution must be modular. The design of your methods is up to you, but the rules of "highly cohesive" and "loosely coupled" must be followed.

Your program should be well-documented. Explain what you're doing in your code. Be sure to include the usual name and assignment notes.
Note your program will have to sort your array before you can find the median. Include your SortSearchUtil.java file which will contain your sort method.

Reference no: EM131396035

Questions Cloud

What is the issue that article is specifically addressing : Articles are written to inform, misinform, influence, or misdirect, among other reasons. Sometimes they serve as nothing more than a vehicle for an author to achieve fame, notoriety, and wealth. You should never take at face value the elements o..
What are the advantages of complex routing algorithms : Complex routing algorithms are used to maintain routing tables. What algorithms are used, and how do they work? What are the advantages and disadvantages of each? Which ones are most commonly used in today's networks?
What are the advantages of complex routing algorithms : Complex routing algorithms are used to maintain routing tables. What algorithms are used, and how do they work? What are the advantages and disadvantages of each? Which ones are most commonly used in today's networks?
Present the problem that needs to be addressed : Provide a concluding paragraph that summarizes the stated problems and promises a solution - Develop a coherently structured paper with an introduction, body, and conclusion.
Create a menu-driven program that accept collection integers : Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen.
Analyze data with a mann whitney test : Grackles, commonly referred to as blackbirds, are hosts for a parasitic worm that lives in the tissue around the brain.- Analyze the data with a Mann-Whitney test and write a conclusion.
Create a menu-driven program that accept collection integers : Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen.
Have you ever been victimized by a computer error : For example, were you ever incorrectly denied credit, billed for something you did not purchase, or assigned an incorrect grade in a course? How did you resolve the problem? On the Web, find the most outrageous story you can involving a computer e..
Create a short story using the information : Create a short story using the information below. Apprx. 2/3 and 1 page in length. (Single spaced - with a space between multiple paragraphs)

Reviews

Write a Review

JAVA Programming Questions & Answers

  Java classes that are implementations of the rectangle class

Write a Java application that enables the user to specify the length, width and location of two instances of a PlaneRectangle and check whether the first lies completely within the second.

  Write a program to compute the cumulative gpa

This program will compute the cumulative GPA based on user input.  This program will use dialog boxes with the JOptionPane class as well as the console to send/receive information to/from the user.

  Create a uml class diagram for a survey class

Create a UML Class Diagram for a Survey class, using the application of your choice. Suggested applications are Visio, Word, Excel or Visual Paradigm. The following are requirements of the Survey class.

  Recognize one high severity vulnerability for computer

Recognize one high severity vulnerability for each computer (if there is one). Explain vulnerability and describe control(s) to minimize risk from vulnerability.

  Create online store web site

the Java and JSP source codes and SQL scripts for creating a database in Oracle - any configuration files used

  Calculates the total at the end

Make a program that asks the user how much change they have and then calculates the total at the end.

  Demonstrate knowledge of design patterns

Your software should make use of the concepts outlined at the start of the assignment brief above. Think about where you can employ appropriate design patterns and other techniques.

  Your task for this project is to design a program to help a

your task for this project is to design a program to help a videorental store operatorrecord clients transactions.nbsp

  Prepare a program to implement array

Write a method, insertAt, that takes four parameters: an array of integers; the length of the array; an integer, say insertItem; and an interger, say, index.

  Use a loop to allow a user to enter a series of numbers

Use a loop to allow a user to enter a series of numbers and then print out the series of numbers when the user is done. The user stops the lseries program by entering -1 (or any negative number).

  Develop a test plan for testing the bankloan class

Create a class named BankLoan which will represent information about a loan a person wants to get from the bank, to purchase a car, a house, or some other expensive item, and they will pay back gradually over time.

  Develop a similar class hierarchy for animals

Java programmers can use class hierarchies for the purposes of inheritance. Develop a similar class hierarchy for Animals

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