Create an employee class with two fields

Assignment Help Basic Computer Science
Reference no: EM13210206

Create an Employee class with two fields-IDNum and hourlyWage. The Employee constructor requires values for both fields. Upon construction, throw an ArgumentException if the hourlyWage is less than $6.00 or more than $50.00. Write a program that establishes, one at a time, at least three Employees with hourlyWages that are above, below, and within the allowed range. Immediately after each instantiation attempt, handle any thrown Exceptions by displaying an error message. Save the file as EmployeeExceptionDemo.es. Next, write an application that creates an array of five Employees. Prompt the user for values for each field for each Employee. If the user enters improper or invalid data, handle any exceptions that are thrown by setting the Employee's ID number to 999 and the Employee's pay rate to the $6.00 minimum. At the end of the program, display all the entered, and possibly corrected, records.

Reference no: EM13210206

Questions Cloud

What is the future worth of the cost of the machinery : A company is going to upgrade it machinery. It costs $150,000 to buy the machinery and have it installed. Operation and maintenance cost are $1500 per year for the first 3 years and then increase by $500 per year for the machine's 10-year salvage ..
What is the purpose of the finally block : How does a method declare that it can throw an exception? How does it actually throw an exception? Use Java code to illustrate your answer.
What business has being made in dubai : Discuss how Chinese, Japanese,Taiwanese, Vietnamese developin Dubai and how they make growth. How and what business has being made in Dubai by them?
How to compute the benefit-cost ratio : A project will cost $50,000. The benefits at the end of the first year are estimated to be $10,000, increasing at a 10% uniform rate in subsequent years. Using an 8-year analysis period and a 10% interest rate, compute the benefit-cost ratio.
Create an employee class with two fields : Create an Employee class with two fields-IDNum and hourlyWage. The Employee constructor requires values for both fields. Upon construction, throw an ArgumentException if the hourlyWage is less than $6.00 or more than $50.00.
Evaluate the quality of your thinking : Identify at least one factor which is necessary for evaluating the quality of your thinking and explain why it is significant for an accurate evaluation of your own critical thinking.
What are the sales-maximizing values of a-r and s : The manager of a firm estimates that the sales of her firm are related to radio and newspaper advertising in the following way: S = 12,000 + 1,800AR, where S = the number of units sold, A = the number of quarter-page newspaper advertisements, and ..
What type of malware attack is this : What type of malware attack is this and what vulnerability is she trying to exploit in order to get her malware code past the network firewalls of these companies?
Use a row function : Create a new table that adds a new column to the l_foods table. Use a row function that will add together the price and the price_increase columns. Name the new column new_price.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a program that prompts the user for an integer value

write a program that prompts the user for an integer value for a length of a youtube clip in seconds then display the number of hours , minutes and seconds within the given length.

  Give the main advantages of a dynamic implementation

Give the main advantages of a dynamic implementation of a list of items over a static implementation.

  Day trader wants to invest a sum of money

Day Trader wants to invest a sum of money that would generate an annually yield of at least $10,000. Two stock groups are available: blue chips and high tech, with average an annual yields of 10% and 25%, respectively

  Identify people to interview to learn new training activity

Draft a project scope statement for the TIMS system and describe the constraints. She said be specific. Need to identify the people want to interview to learn more about the new training activity, and prepare a list of the questions I will ask.

  What information to save-process moves from running to idle

When a process moves from running to idle, the state of the machine has to be saved. Obviously this cannot mean the whole state, as there would be no place to save it. Just what information has to be saved?

  Type of information of microsoft useful inprofessional life

What kind of information on the site do you find to be valuable to you? What kind of information about Microsoft Word do you find to be useful in your personal or professional life? Explain.

  Displays the factorial for every integer

Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24.

  Classify memory in hierarchy

Classify a memory in hierarchy according to the two most common attributes like accessing method and speed.

  What these three things(rob, rs, rsr) explain

What these three things(ROB, RS, RSR)  explain  ?

  Compute millions of instructions per second of program

Compute the MIPS (Millions of Instructions Per Second) rating for each processor during execution of this particular program

  Why would a manufacturer choose such a peculiar number

A certain computer can be equipped with 1,073,741,824 bytes of memory. why would a manufacturer choose such a peculiar number, instead of an easy-to-remember number like 1,000,000,000?

  Modify solution and categorize it using big-theta notation

Sometimes a slight change in the problem can significantly modify form of its solution. For instance, determine simple algorithm for solving following problem and categorize it using big-theta notation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd