Create code in NetBeans java gui jframe form: Program Requirements: Create a program that has the ability
Fantastic news! We've Found the answer you've been seeking!
Question:
Create code in NetBeans java gui jframe form:
Program Requirements:
Create a program that has the ability to store and display integer values in an array. Create an array that is 20 elements long. Your program must be able to:
- Add numbers (only positive) to the array using screen input.
- Remove the first occurrence number from the array based on screen input.
- List all of the elements in the array and compute the sum of all the elements.
- List the even elements in the array and compute the sum of the even elements.
- List the odd elements in the array and compute the sum of the odd elements.
Tips:
- Arrays are immutable, meaning that you can't actually delete an element from an array. So when you remove an element from an array it means that you are setting it back to zero. As such, for this program, the user should only be allowed to enter positive numbers.
- This array is 20 elements long. Meaning that the user cannot add more than 20 numbers. Ensure that your program is coded in a way that gives the users feedback when they have reached the maximum and ensure that your program never crashes due to an attempt to access an index of the array that does not exist.
- Even integers can be determined by dividing each number by two.
- If the remainder is 0, the number must be even.
- If there is a remainder, the number must be odd.
Sample Application Output:
Related Book For
Posted Date: