- 1. Read the problem statement.
- 2. Formulate the
algorithm using pseudocode and top-down, stepwise refinement. - 3. Write a Java
program . - 4. Test, debug and execute the Java program.
- 5. Process three complete sets of data.
(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.
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Java How to Program, Early Objects (11th Global Edition) - Does NOT include MyLab Programming
Additional Engineering Textbook Solutions
Starting Out with Python (4th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Starting Out with C++ from Control Structures to Objects (8th Edition)
Artificial Intelligence: A Modern Approach
Concepts Of Programming Languages
Starting Out with Java: Early Objects (6th Edition)
- Java - Painting a Wallarrow_forwardCalculate your Physics final Write a Java program to solve the following problem: grade based on the following: Assessment Percent Lab Activity(ies) Quiz (zes)/Test (s) 10% 10 Assignment (s) 208 Midterm Exam (8) 20% Final Exam 40% Theory grade is the quiz/test, midterm and final exam marks. Practical grade is the assignment and lab marks. Final grade is all five marks. But the calculation of Final grade needs to comply with the following rule: If either of the practical or theory grade is less than 50%, the final grade is the lesser of the two. A grade letter must be assigned based on the final grade (See the courses outline for the distribution of grades) You must implement input validation for each mark as follows: Lab mark must be out of 10. Quiz/Test mark must be out of 10. Assignment mark must be out of 20. Midterm mark must be out of 20. Final Exam must be out of 40. Bonus: Modify your code so that you can calculate and display grade for N number of students. Your program must…arrow_forwardLanguage : Java or C++ Write a Program that takes users input Date, Month and Year and detect what day of the week was it. e.g 17 July 2007 Output will be : Tuesday Note : Be aware of Leap yeararrow_forward
- help please answer in text form with proper workings and explanation for each and every part and steps with concept and introduction no AI no copy paste remember answer must be in proper format with all workingarrow_forwardInstructions A local biologist needs a program to predict population growth. The inputs would be: 1. The initial number of organisms, as an int 2. The rate of growth (a real number greater than 1), as a float 3. The number of hours it takes to achieve this rate, as an int 4. A number of hours during which the population grows, as an int For example, one might start with a population of 500 organisms, a growth rate of 2, and a growth period to achieve this rate of 6 hours. Assuming that none of the organisms die, this would imply that this population would double in size every 6 hours. Thus, after allowing 6 hours for growth, we would have 1000 organisms, and after 12 hours, we would have 2000 organisms. Write a program that takes these inputs and displays a prediction of the total population. An example of the program input and output is shown below: Enter the initial number of organisms: 10 Enter the rate of growth (a real number › 1]: 2 Enter the number of hours to achieve the…arrow_forwardprovide java codearrow_forward
- need help in java. (1) Prompt the user for a string that contains two strings separated by a comma. (1 pt) Examples of strings that can be accepted: Jill, Allen Jill , Allen Jill,Allen Ex: Enter input string: Jill, Allen (2) Report an error if the input string does not contain a comma. Continue to prompt until a valid string is entered. Note: If the input contains a comma, then assume that the input also contains two strings. (2 pts)Ex: Enter input string: Jill Allen Error: No comma in string. Enter input string: Jill, Allen (3) Extract the two words from the input string and remove any spaces. Store the strings in two separate variables and output the strings. (2 pts)Ex: Enter input string: Jill, Allen First word: Jill Second word: Allen provided code: import java.util.Scanner; public class ParseStrings { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); /* Type your code here. */ }} (4) Using a loop, extend the program to handle…arrow_forwardanswer questions ( java language ) let: a= 2 b = 4 c= 5 d= 2 e= 20 f= 50arrow_forwardJava or C++ program to display the given output -----Library System----1. Add a Student2. Add a Book3. Display All Students4. Display All Books5. Search a Student6. Search a Book7. Borrow a Book8. Display Borrowed Books9. Return a Book10. Exit ➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number,surname, first name, age, and sex)➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number,Title, Author’s name(Surname, first name), date of purchase, and status (available/notavailable))➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name,age, and sex)➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’sname(Surname, first name), date of purchase, and status (available/not available)➢ When 5 is chosen, ask the user if he wants to search the list by Surname or IDnumber. If record is found, display the corresponding record, else display anappropriate prompt.➢ When 6 is…arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT