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...
-
Para afinar la estrategia de producto para su plan de marketing , realice estas dos acciones : 1 Prepare una tabla con tres columnas en la cual: a) los segmentos del mercado de consumidores...
-
E12.3. Analyzing the Growth in Shareholders' Equity (Easy) The following numbers were calculated from the financial statements for a firm for 2009 and 2008: 2009 2008 Return on common equity (ROCE)...
-
Ellis Fabric Store shows the trial balance on page 601 as of December 31, 20-1. At the end of the year, the following adjustments need to be made: (a and b) Merchandise inventory as of December 31,...
-
Avia Company soils a product for 500 per unit Variable costs are $50 per unit, and fixed costs are $600 per month. The company expects to sell 600 units in September. The unit contribution margin: O...
-
Which life cycle model would you follow for developing software for each of the following applications? Mention the reasons behind your choice of a particular life cycle model. Clearly Justify your...
-
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...
-
During a recent trip to her favorite restaurant, Sandy (owner of shop 1) met Chris Talley (owner of shop 7). After an enjoyable lunch, Sandy and Chris had a heated discussion about market share for...
-
What work trait differences are similar in chart 1 and chart 2? Provide a comment for each of the 4 generations from each chart. Which work trait differences vary from those identified in chart 1 and...
-
Given the ALU design illustrated below, without changing the circuit design, please use the ALU to perform a logic NAND operation. Find out what the control signals should be (i.e. the values of...
-
Problem #5: Using the method of joints, determine the force in each member. State whether each member is in compression or tension. If the largest force each member can support is 4kN tension and 3kN...
-
Your cultural/social background and that of your family. What language, policies/structures and customs are relevant to your own culture? How do you think your own background impacts on people from...
-
In this second Case Assignment, the assignment is going to test your understanding of how successful teams operate efficiently through teamwork. Teamwork relies upon individuals to work together to...
-
Bryan buys a new washer/dryer set worth $3996. His first option is to pay for the appliances on his personal (unsecured) line of credit and pay it back after 6 months. His second option is to use a...
-
Stephen Schor, an accountant in New York City, advised his client, Andre Romanelli, Inc., to open an account at J. P. Morgan Chase Bank, N.A., to obtain a favorable interest rate on a line of credit....
-
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
-
Construction of consumer price index number for the given goods and services. Item Weight in % Base period price Current period price Food 35 150 145 Fuel 10 25 23 Cloth 20 75 65 Rent 15 30 30 Misc....
-
Gammaro Corporation has found that 80% of its sales in any given month are credit sales, while the remainder are cash sales of the credit sales, Gammaro Corporation has experienced the following...
-
Swifty Company estimates that 2022 sales will be $43,200 in quarter 1,$51,840 in quarter 2 , and $62,640 in quarter 3 , Cost of goods sold is 50% of sales. Management desires to have ending...
Study smarter with the SolutionInn App