Create an application that accepts employee data interactively. Users might make any of the following errors as
Question:
Create an application that accepts employee data interactively. Users might make any of the following errors as they enter data:
The employee number is not numeric, less than 1000, or more than 9999.
The hourly pay rate is not numeric, less than $9.00, or more than $25.00.
Create a class that stores an array of six usable error messages that describe the preceding mistakes; save the file as EmployeeMessages.java. Create an EmployeeException class; each object of this class will store one of the messages. Save the file as EmployeeException.java. Create an application that prompts the user for employee data, and display the appropriate message when an error occurs. If no error occurs, display the message “Valid employee data”. Save the program as EmployeeDataEntry.java.
Step by Step Answer:
EmployeeDataEntry import javautil public class EmployeeDataEntry public static void mainString args ...View the full answer
Students also viewed these Computer science questions
-
A company accepts user orders for its products interactively. Users might make the following errors as they enter data: The item number ordered is not numeric, too low (less than 0), or too high...
-
Create a class that stores an array of usable error messages save the file as Data Messages java Create a Data Exception class each object of this class will store one of the messages Save the file...
-
Create a TaxReturn class with fields that hold a taxpayers Social Security number, last name, first name, street address, city, state, zip code, annual income, marital status, and tax liability....
-
Harvold Company's quality cost report is to be based on the following data: Test and inspection of incoming materials. $71,000 Supplies used in testing and inspection . Re-entering data because of...
-
Assume that female students' heights are normally distributed with a mean given by = 64.2 in and a standard deviation given by = 2.6 in. a. If 4 female students are randomly selected, find the...
-
Vedula Advertising Agency was founded by Murali Vedula in January 2007. Presented here are both the adjusted and unadjusted trial balances as of December 31, 2012. Instructions(a) Journalize the...
-
3. Federal law requires that all banks file reports with the IRS any time a customer engages in a cash transaction in an amount over $10,000. It is a crime for a bank to "structure" a cash...
-
Hobart, Evans, and Nix is a small law firm that employs 10 partners and 12 support persons. The firm uses a job-order costing system to accumulate costs chargeable to each client, and it is organized...
-
7. Given the following information, determine the proper order quantity for each item if the periodic order method is used: Item Smirnoff Vodka Par Stock Usage Quantity on Hand Order Quantity 65 48...
-
On July 29, 2012, Ever Green Company, a garden retailer, purchased $12,000 of seed, terms 2/10, n/30, from Fleck Seed Co. Even though the discount period had expired, Mary Jasper subtracted the...
-
Create a UsedCarException class that extends Exception; its constructor receives a value for a vehicle identification number (VIN) that is passed to the parent constructor so it can be used in a...
-
Design an application for a pizzeria. The user makes pizza order choices from list boxes, and the application displays the price. The user can choose a pizza size of small ($7), medium ($9), large...
-
Investigations should always end with a report of the investigation. If a suspect has confessed to fraud, it would a. Be appropriate to indicate the suspect's guilt in the report. b. Be appropriate...
-
As an accountant, what can you do to benefit from data visualization tools if you are not proficient in them yourself?
-
It is not always easy to make a clear-cut distinction between private goods and public goods. Give examples of goods and services that are not pure public goods, but which are produced by the public...
-
Within the example tools and vendors provided, identify three leading vendors and products in each of these product categories: virtual reality, immersive VR, augmented reality, mixed reality.
-
When constructing a confidence interval for p1 p2, we assume that items in each sample are divided into ________________ categories and that there are at least ________________ items in each...
-
As an accountant, how could you benefit from being proficient in one or more data visualization tools?
-
Martin is planning to buy shares in the company that employs him. He knows that the directors of the company are his employers but he wonders what relationship exists between the directors and the...
-
Chapter 9 Stock Valuation at Ragan Engines Input area: Shares owned by each sibling Ragan EPS Dividend to each sibling Ragan ROE Ragan required return Blue Ribband Motors Corp. Bon Voyage Marine,...
-
The this reference _____________. a. Can be used implicitly b. Must be used implicitly c. Must not be used implicitly d. Must not be used
-
Methods that you reference with individual objects are _____________. a. private b. public c. static d. nonstatic
-
Variables that are shared by every instantiation of a class are _____________. a. Class variables b. Private variables c. Public variables d. Illegal
-
If 57% of the people in a community use the emergency room at a hospital in one year, a sample of 11 people use the emergency room. Find the probability of at least 5 people use the emergency room. O...
-
Data validation works for setting a reasonable range for _______. a. Both inputs and formulas b. Formulas c. Inputs d. All types of data
-
What is the science of fact-based decision making? A. Analytics B. Structured decisions C. Unstructured decisions D. Semistructured decisions
Study smarter with the SolutionInn App