EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 5, Problem 6PE
Program Plan Intro

Calculate the pay for employees

Program plan:

  • Import necessary package.
  • Create a class “AcmePay”,
    • Define the method “main ()”,
      • Declare and initialize the necessary variables.
      • Prompt the user to enter the shift into the first dialog box.
      • Assign the integer value returned form the method “parseInt()”.
      • Prompt the user to enter the hours worked into the second dialog box.
      • Assign the integer value returned form the method “parseInt()”.
      • Check whether the shift is “1”,
        • If it is true, assign the pay rate for shift_1.
      • Otherwise, check whether the shift is “2”,
        • If it is true, assign the pay rate for shift_2.
      • Otherwise,
        • Assign the pay rate for shift_3.
      • Check whether the hours worked is greater than the full week hours,
        • Compute the regular pay in terms of full week hours.
        • Compute the overtime pay.
      • Otherwise,
        • Compute the regular pay in terms of hours worked.
        • Set the overtime pay as “0.0”.
      • Compute the total pay.
      • Check whether the shift is “2” or shift is “3”,
        • Get the input entered into the dialog box.
        • Assign the integer value returned from the method “parseInt()”.
        • Check whether the entered value is “1”,
          • If it is true, compute the deduced amount.
      • Concatenate the string with pay calculated.
      • Display the output message in dialog box.

Blurred answer
Students have asked these similar questions
For example, if a company has a certain amount of income or a certain number of workers, it may be eligible to submit its tax return early.
Engineering economics
Systems Analysis Assignment (Microsoft Word and Excel) You and your team have been hired to set up a computer classroom for Tech United, Inc. An up and coming tech startup who will like to become a tech training company. Tech United, Inc. wants to offer various different kinds of tech training at their new office location. They have only one classroom space available that can accommodate up to 30 students. The classroom is already equipped with tables and chairs. The classroom, however, does not have any computers, routers, projectors, smartboard etc. This is where you come in. The company has $40,000 as a starting budget and will like for you to determine for them what computers/keyboards/mouse/router/printer/smartboard etc. they should buy. You determine based on their budget, how many of each item should be purchased for the classroom. Deliverables Deliverable Part 1: A systems analysis report on what kind of computers and hardware the company should use in their classroom,…
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY