Assignment 3 Task 1: Write a program that generates 100 random integers between 0 and 9 and displays the count for each number. (Hint: Use an array of 10 integers to store the counts for the number of...

Avoid plagiarism



Assignment 3 Task 1: Write a program that generates 100 random integers between 0 and 9 and displays the count for each number. (Hint: Use an array of 10 integers to store the counts for the number of 0s, 1s, …, 9s.) Task 2: Asks for the hourly pay rate and hours worked for an employee and returns the employee's net pay for those hours. Each employee is paid 1.5 times their regular hourly rate for all hours over 40. A tax amount of 1 percent of gross salary is deducted. The program should keep going until you enter N. Finally display the total pay for all employees and its average. Your result should look like, for example: Continue: Y Hourly wage rate: 10 Hours worked: 10 Net payment: $99 Continue: Y Hourly wage rate: 10 Hours worked: 20 Net payment: $198 Continue: N ----------------------------- Total payment:   $   297.00 Average payment: $   148.50 Task 3: Write a “soldier” method that finds the smallest element in an array of double values using the following header: public static double min(double[] array) Write a program that prompts the user to enter 10 numbers, calls the above min method to return the minimum value, and displays the minimum value. Your program should look like, for example: Enter 10 numbers: 1.9 2.5 3.7 2 1.5 6 3 4 5 6 The minimum number is: 1.5 Task 4: Use your imagination to come up with a situation where you can write a program that contains if, a loop (for loop or while loop), a value returning method which accepts an array. And write this program.
Mar 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here