Create a class and a main() method that implements the following (define the local variables or additional arrays as you see necessary): Create a salary array (integer type) with 12 elements. Ask the user to input value from keyboard for each array element. If the input value is not between 0 and 15,000, keep asking the user to re-input till a valid value is obtained (hint: use a while loop). If one’s salary is higher than $8,000, he/she get 8% of his/her salary for bonus. Otherwise the bonus rate is 12%. After the salary information has been input for everyone, print out the salary and bonus for everyone. Each record in a separate line. Find out the highest bonus value and print it out.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Modularization Techniques
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
  1. Create a class and a main() method that implements the following (define the local variables or additional arrays as you see necessary):
  • Create a salary array (integer type) with 12 elements.
  • Ask the user to input value from keyboard for each array element. If the input value is not between 0 and 15,000, keep asking the user to re-input till a valid value is obtained (hint: use a while loop).
  • If one’s salary is higher than $8,000, he/she get 8% of his/her salary for bonus. Otherwise the bonus rate is 12%.
  • After the salary information has been input for everyone, print out the salary and bonus for everyone. Each record in a separate line.
  • Find out the highest bonus value and print it out.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,