Problem: 1 A company want to raise the salary of its employee. The raise rate is given as following: The raise rate is 20% of the salary if the employee have 15 years in work or more The raise rate is 10% of the salary if the employee have 7 years in work or more Otherwise, the raise rate is 5% of the salary. The new salary is computed by the formula: new salary=old salary x(1+ raise rate) Write a main program that prompts the user to enter n of employees then enter their salary and years in work of each of them. It displays the new salary for each employee and finally, it displays the average salaries of all employees after raising as shown in the following sample run. Sample run Enter the number of employees: 2 Enter the salary and the number of years of Employee 1: 1500 Enter the salary and the number of years of Employee 2: 800 16 80 The New Salary of Employee 1 is: 1800 The New Salary of Employee 2 is: 880 The average Salary of all employees is: 1340

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
ODU2MTQ4/a/MjkwNjEwMTAyODU1/details
Problem: 1
A company want to raise the salary of its employee. The raise rate is given as following:
The raise rate is 20% of the salary if the employee have 15 years in work or more
The raise rate is 10% of the salary if the employee have 7 years in work or more
Otherwise, the raise rate is 5% of the salary.
The new salary is computed by the formula: new salary=old salary x(1+ raise rate)
Write a main program that prompts the user to enter n of employees then enter their salary
and years in work of each of them. It displays the new salary for each employee and finally, it
displays the average salaries of all employees after raising as shown in the following sample
run.
Sample run
Enter the number of employees: 2
Enter the salary and the number of years of Employee 1: 1500
Enter the salary and the number of years of Employee 2. 800
16
8.
The New Salary of Employee 1 is: 1800
The New Salary of Employee 2 is: 880
The average Salary of all employees is: 1340
Problem: 2
Write a Java program that reads from the user a positive integer,
then separates the integer into its individual digits and prints a
message indicating the sum of its digits and if the sum of its
digits is odd or even.
Note that, if the user entens 7 nagative noberor zero, he should
be repeatedly asked to enter a nositive numbon
Transcribed Image Text:ODU2MTQ4/a/MjkwNjEwMTAyODU1/details Problem: 1 A company want to raise the salary of its employee. The raise rate is given as following: The raise rate is 20% of the salary if the employee have 15 years in work or more The raise rate is 10% of the salary if the employee have 7 years in work or more Otherwise, the raise rate is 5% of the salary. The new salary is computed by the formula: new salary=old salary x(1+ raise rate) Write a main program that prompts the user to enter n of employees then enter their salary and years in work of each of them. It displays the new salary for each employee and finally, it displays the average salaries of all employees after raising as shown in the following sample run. Sample run Enter the number of employees: 2 Enter the salary and the number of years of Employee 1: 1500 Enter the salary and the number of years of Employee 2. 800 16 8. The New Salary of Employee 1 is: 1800 The New Salary of Employee 2 is: 880 The average Salary of all employees is: 1340 Problem: 2 Write a Java program that reads from the user a positive integer, then separates the integer into its individual digits and prints a message indicating the sum of its digits and if the sum of its digits is odd or even. Note that, if the user entens 7 nagative noberor zero, he should be repeatedly asked to enter a nositive numbon
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education