MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM
9th Edition
ISBN: 9780357505526
Author: FARRELL
Publisher: CENGAGE L
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
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.
- Define the method “main ()”,
Expert Solution & Answer
Trending nowThis is a popular solution!
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.
Chapter 5 Solutions
MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM
Ch. 5 - Prob. 1RQCh. 5 - Prob. 2RQCh. 5 - Prob. 3RQCh. 5 - Prob. 4RQCh. 5 - Prob. 5RQCh. 5 - Prob. 6RQCh. 5 - Prob. 7RQCh. 5 - Prob. 8RQCh. 5 - Prob. 9RQCh. 5 - Prob. 10RQ
Ch. 5 - Prob. 11RQCh. 5 - Prob. 12RQCh. 5 - Prob. 13RQCh. 5 - Prob. 14RQCh. 5 - Prob. 16RQCh. 5 - Prob. 17RQCh. 5 - Prob. 18RQCh. 5 - Prob. 19RQCh. 5 - Prob. 20RQCh. 5 - Prob. 1PECh. 5 - Prob. 2PECh. 5 - Prob. 3PECh. 5 - Prob. 4PECh. 5 - Prob. 5PECh. 5 - Prob. 6PECh. 5 - Prob. 7PECh. 5 - Prob. 8PECh. 5 - Prob. 9PECh. 5 - Prob. 10PECh. 5 - Prob. 1GZCh. 5 - Prob. 2GZCh. 5 - Prob. 3GZCh. 5 - Prob. 4GZCh. 5 - Prob. 5GZ
Knowledge Booster
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
- A patient pack of a drug contains 84 tablets and is designed to last for 1 month. If the patient takes one dose twice a day, what is the dose?arrow_forwardProblem Statement: A famous product photographer Xavier is in high demand and is being approached by various companies to get their products photographed. Xavier does all of this product shoots at his studio and wants to make sure that he maximizes his returns by covering as many photoshoots in a day as possible. For a product shoot to be conducted, the product first has to be staged and then photographed. He has a team who stages the products and he does the photoshoots. Depending on the product, it takes different amounts of time to stage and varied time to complete the shoot. His team can stage another product in another part of the studio while Xavier is busy with a photoshoot of a previously staged product. Assuming that his team can work on only one product at a time before they move to staging another and Xavier also finishes one product photoshoot before moving to the next, you are expected to help Xavier make best use of his team and his time by deciding the order in which the…arrow_forwardAITAM Public Library is the biggest library in Koforidua. Currently, it has about 300 members. A person who is 18 or above can become a member. There is a membership fee of GHC400 for a year. There is a form to be filled in which person fills personal details. These forms are kept in store for maintaining members’ records and knowing the membership period. A member can issue a maximum of three books. He/she has three cards to issue books. Against each card a member can issue one book from library. Whenever a member wishes to issue a book and there are spare cards, then the book is issued. Otherwise that request is not entertained. Each book is to be returned on the specified due date. If a member fails to return a book on the specified date, a fine of GHC 2 per day after the due return date is charged. In case a card gets lost, then a duplicate card is issued. Accounts are maintained for the membership fees and money collected from the fines. There are two librarians for books return…arrow_forward
- 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.arrow_forwardCase Study: A Video Store (AVS) runs a business of renting out video to customers. Every customer must have a AVS customer card in order to rent a video, or he need to apply for one. Customers rent videos for three days at a time. Every time a customer rents a video, the system must ensure that they do not have any overdue videos. If so, the overdue videos must be returned and an overdue fee paid before customer can rent more videos. Likewise, if the customer has returned overdue videos, but has not paid the overdue fee, the fee must be paid before new videos can be rented. Every morning, the store manager prints a report that lists overdue videos. If a video is two or more days overdue, the manager calls the customer to remind them to return the video. If a video is returned in damaged condition, the manager removes it from the video database and may sometimes charge the customer. Task 1: Behavioral communication diagram. Create a communication diagram…arrow_forwardGreenLawn a local lawn care company has different pricing policies for its customers. GreenLawn sends out monthly invoices and will give discounts if payments are made within 5 days. The discounting policy is as follow: If the amount of the monthly bill is greater than $300, subtract 4 percent from the invoice; if the amount is between $300 and $100, subtract a 2-percent discount; if the amount is less than $100, do not apply any discount. All bills made via the web automatically receive an extra 3-percent discount. Develop a decision for GreenLawn discounting decisions. Decision Table submission: Include the initial table with all rules, and the most simplified table. Use different colors in the columns to easily show how columns are collapsed/simplified. please do not provideo solution in image format thank you!arrow_forward
- 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. Create a Class Diagram of at least six (6) major entities for your application. For entities with a large number of attributes you are allowed to limit your attributes to a max of six (6). All operations within each class should be identified by their visibilityarrow_forwardMORSE TYPE: Sacred images must invite the faithful to contemplation and prayer. If the sacred images of either the Blessed Mother Mary or the saints are used in liturgical celebrations, it means the faithful are instructed to shift from veneration to worship.arrow_forwardEngineering economicsarrow_forward
- 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,…arrow_forwardComputer sciencearrow_forwardSenario Programming Competition System – Schools and Universities always want to participate in a programming competition. Currently, everything such as competition rules, and the organisation is handled manually. This should be automated so that participants just log onto the system to see if they are eligible to participate or not and be able to monitor their requests online. Task is to: Create a User Requirement Specification for a programming competition in which scholars, university students as well as school students will take part inarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
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