Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This was class work for today I went to the bathroom and missed my teacher going over the code, can someone please send the java

This was class work for today I went to the bathroom and missed my teacher going over the code,
can someone please send the java code so I can look it over. Thanks, Nolan image text in transcribed
Full Question:
Create A Program to take in integers and sort them by even and odd numbers as well as negatives.
Output: image text in transcribed
(1) Write a program that takes integers as input until the user enters "q" The inputs should be taken in should place the integers into an ArrayList called numberlist Remember, you can not make Array have to be Integer objects. To get the input, you will need to first save the user's input into a string Then, if the string is not eq the string into numberlist. To do this, use the parseInt method. (Example: Integer.parseInt(st (2) Sort the the even numbers into an ArrayList called evenlist the odd integers into an ArrayList integers into an ArrayList called negativeList. (3) Display the contents of the three ArrayLists after all of the integers have been entered. (4) Lastly the program will ask the use if they wish to enter another set of numbers. Requirements: Proper variables Use of ArrayLists of Integer objects (4 of them) Error detection for the user input using a while loops and if statements Proper output using an enhanced for loop Utilize ArrayLists and use the following methods in the ArrayList class: o add o get o size o tostring o clear Please enter integers (Positive or Negative) or type 'q' to quit 1: 8 2: 5 3: 90 4: -5 5: 13 6: 87 7: 54 8: 8 9: 45 10: 32 11: 10 12:9 The Even Numbers are: [8, 90, -54, 8, 32, 10] The Odd Numbers are: [5, -5, 13, 87, 45) The Negative Numbers are: (-5, -54] Do you want to enter a new list? (y or ny Please enter integer's (Positive or Negative) or type 'q' to quit 1: 8 freerecorders.com 3: 3 2

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

Define and provide examples of organizational climate.

Answered: 1 week ago