MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM
MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM
9th Edition
ISBN: 9780357505526
Author: FARRELL
Publisher: CENGAGE L
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
Video-Rental LTD is a small video rental store. The store lends videos to customers for a fee, and purchases its videos from a local supplier.   A customer wishing to borrow a video provides the empty box of the video they desire, their membership card, and payment – payment is always with the credit card used to open the customer account. The customer then returns the video to the store after watching it.   If a loaned video is overdue by a day the customer's credit card is charged, and a reminder letter is sent to them. Each day after that a further card is made, and each week a reminder letter is sent. This continues until either the customer returns the video, or the charges are equal to the cost of replacing the video.   New customers fill out a form with their personal details and credit card details, and the counter staff give the new customer a membership card. Each new customer's form is added to the customer file.   The local video supplier sends a list of available titles to…
Case study: Students and staff purchase ready to eat snack-foods such as chocolate bars, cookies, chips, drinks, etc. using an automated vending machine. Each snack-item has a price and a name.  Any customer can buy an item, using funds available on the university identity card to pay for it. Cash payments are not allowed. The vending machine has a card reader. Customers tap their ID card against the card-reader. The card-reader reads the card and stores its details for the duration of the interaction. After the card is verified, the customer may choose the snack item and opt to buy it. The vending machine will verify that there is sufficient balance on the card to pay for the item and automatically deducts the amount towards the purchase of the snack-item if sufficient funds are available. The customer can buy as many items as they’d like. Task: Draw a sequence diagram depicting a successful sale scenario for the case study described above.
USC (PAG) Personal Academic Guide ™ is your personal electronic sequence sheet. This is a simple application to keep track of each course you are doing/have done, serve as a personal exam timetable for the course which have final exams, keep track of your projects for courses with projects and keep a record of grades earned. It should also allow you to write notes for each course you have done. The concept is like a check sheet system blended with a simple exam timetable. Use   the UML Class diagram below to: Create the appropriate sequence diagrams to model at least three (3) areas of your application.
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
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
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
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