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...
-
The following transactions of Beltville College transpired during 2020. The funds necessary are the Endowment Fund, the Annuity Fund, the Plant Fund?Unexpended, the Plant Fund?Investment in Plant,...
-
An automobile engine has a maximum power output of \(70 \mathrm{hp}\), which occurs at an engine speed of \(2200 \mathrm{rpm}\). A \(10 \%\) power loss occurs through the transmission and...
-
No coffee is produced in the United States. Americans can buy as much coffee as they want from foreign producers at a price of $10 per pound. At this price, they buy 1,000 pounds per week. The U.S....
-
(b) Ganguly Ltd. was formed with an authorized capital of Rs 12,00,000 divided into 1,20,000 equity shares of Rs 10 each, to acquire the business of A and B whose balance sheet on the date of...
-
Jimmy owns a garden in which he has planted N trees in a row. After a few years, the trees have grown up and now they have different heights. Jimmy pays much attention to the aesthetics of his...
-
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...
-
University of Maryland marketing professor R. W. Hamilton studied how people attempt to influence the choices of others by offering undesirable alternatives (Journal of Consumer Research, Mar. 2003)....
-
What similar patterns cut across escalating relationships? Discuss marital relationships, relationships between friends, and parentchild relationships as individuals move toward intimacy.
-
Discuss enmeshment and its relationship to conversations in your family. Be sure to define the term before applying it.
-
What is Robotic Process Automation (RPA) and in what type of work environment is it most effectively used?
-
Do you believe that given all the different mediated sources available today, the U.S. media are ubiquitous, consonant, or cumulative? Exemplify your responses.
-
Weick describes the process of enactment, selection, and retention to understand how organizations deal with information inputs. Provide an example of how your school has employed these strategies in...
-
In fiscal 2017, Ivanjoh Realty Corporation purchased unimproved land for $55,000. The land was improved and subdivided into building lots at an additional cost of $34,460. These building lots were...
-
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
-
A bank can either invest money for three months at 4.00% or for nine months at 4.50%. Ignoring actual/360 day count adjustments for the purpose of this question, the three against nine FRA quote the...
-
Shuggy Otis, an executive at Slapfish Corp. (SC) intends to retire in 11 years. SC just announced that it will start depositing $500.00 at the end of each quarter into each of its workers' retirement...
-
On January 1, the Hanover Beverage Company replaced the palletizing machine on one of its juice lines. The cost of the machine was $195,000. The machine's expected life is five years or 480,000...
Study smarter with the SolutionInn App