[Solved] JAVA Control Structures Exercise

30 $

File Name: JAVA_Control_Structures_Exercise.zip
File Size: 301.44 KB

SKU: 4523 Category: Tag:

Or Upload Your Assignment Here:


5/5 – (4 votes)

1. (Salary Calculator) Develop a Java application that determines the gross pay for each of three employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40. You’re given a list of the employees, their number of hours worked last week and their hourly rates. Your program should input this information for each employee, then determine and display the employee’s gross pay. Use class Scanner to input the data.

2. Write a Java application that inputs a series of 10 integers and determines and prints the largest integer.

3. (Find the Two Largest Numbers) Find the two largest values of the 10 values entered.

4. (Palindromes) A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write an application that reads in a five-digit integer and determines whether it’s a palindrome. If the number is not five digits long, display an error message and allow the user to enter a new value.

5. (Sides of a Triangle) Write an application that reads three nonzero values entered by the user and determines and prints whether they could represent the sides of a triangle.

6. (Sides of a Right Triangle) Write an application that reads three nonzero integers and determines and prints whether they could represent the sides of a right triangle.

7. (Find the Smallest Value) Write an application that finds the smallest of several integers. Assume that the first value read specifies the number of values to input from the user.

8. (Calculating the Product of Odd Integers) Write an application that calculates the product of the odd integers from 1 to 15.

Shopping Cart
[Solved] JAVA Control Structures Exercise
30 $