The program should perform the following steps: 1. Ask the user to enter integer N between 7 and 77. 2. The program should then create an array (not a list) of size N 3. The program then should create N random numbers between 1 and 100. Assume this number is called R. For each random number R A. if R is even, place the number R starting at the end of the array. B. if R is odd, the then that number is written to the array from the start index 0. C. continue until the all random numbers are generated 4. The program should print out the array at the end 5. Program will exit • Make sure you comment your program in your source code file. • Make sure you clean extra comments • Make sure you use the best practices in writing your program o Example:Prompt the user with a message for the input o Use methods rather than eveything in Main. o Variables names and methods names (identifiers) should semantically reflect their purpose Catch any runtime error (if any)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
The program should perform the following steps:
1. Ask the user to enter integer N between 7 and 77.
2. The program should then create an array (not a list) of
size N
3. The program then should create N random numbers
between 1 and 100. Assume this number is called R.
For each random number R
A. if R is even, place the number R starting at the end
of the array.
B. if R is odd, the then that number is written to the
array from the start index 0.
C. continue until the all random numbers are
generated
4. The program should print out the array at the end
5. Program will exit
• Make sure you comment your program in your source
code file.
• Make sure you clean extra comments
• Make sure you use the best practices in writing your
program
Example:Prompt the user with a message for the
input
o Use methods rather than eveything in Main.
o Variables names and methods names (identifiers)
should semantically reflect their purpose
• Catch any runtime error (if any)
The purpose of this HW is to make sure you brush up on
your programming skills. submit one source code file.
Start right away. Do not postpone
Transcribed Image Text:The program should perform the following steps: 1. Ask the user to enter integer N between 7 and 77. 2. The program should then create an array (not a list) of size N 3. The program then should create N random numbers between 1 and 100. Assume this number is called R. For each random number R A. if R is even, place the number R starting at the end of the array. B. if R is odd, the then that number is written to the array from the start index 0. C. continue until the all random numbers are generated 4. The program should print out the array at the end 5. Program will exit • Make sure you comment your program in your source code file. • Make sure you clean extra comments • Make sure you use the best practices in writing your program Example:Prompt the user with a message for the input o Use methods rather than eveything in Main. o Variables names and methods names (identifiers) should semantically reflect their purpose • Catch any runtime error (if any) The purpose of this HW is to make sure you brush up on your programming skills. submit one source code file. Start right away. Do not postpone
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,