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

  Compute the approximate nth root of x

Problem: Given a positive integer n and a positive integer x compute the approximate nth root of x.

  What are the advantages of inheritance

In C++, What are the advantages of Inheritance? What are the advantages of Composition?

  Elements corresponding to the inorder sequence

Suppose that you are given two sequences of elements corresponding to the inorder sequence and the preorder sequence. Prove that it is possible to reconstruct a unique binary tree .

  When users move the mouse

When users move the mouse over each thumb image of the item, an enlarged picture of the item will appear to the right of the thumb image. For each listed item, you should allow user to specify the numbers he/she intends to buy

  Research a writing guide for forensics organization

Your manager has asked you to research and recommend a writing guide that examiners in your computer forensics organization will use for all official written reports.

  Explaining role-computer forensic investigator for law firm

You are the computer forensic investigator for a law firm. The firm acquired a new client, a young woman who was fired from her job for inappropriate files discovered on her computer

  What percentage of total cpu time is spent keeping clock

What percentage of the total CPU time is spent maintaining a clock that is accurate to a resolution of one millisecond?

  Statistics about the numbers read

Write a function whose job is to input #'s, non-# to quit, recover from the input failure by calling recover(), and tell main some statistics about the numbers read. . unsigned readA();

  How asymptotic notation can be used to rank the efficiency

To illustrate how asymptotic notation can be used to rank the efficiency of algorithms, use the relations "Ì" and "=" to put the orders of the following functions into a sequence, where e is an arbitrary real constant, 0

  What is technology s-curve

What is technology S-curve? Give an example that explains how to use S-curves to prescribe development of new component technologies.

  Business environment impacted development telecommunication

Describe in scholarly detail how business environment has influenced development of telecommunications technology.

  Write the definition of a function absolutevalue

Write the definition of a function absoluteValue , that receives an integer parameter and returns the absolute value of the parameter's value. So, if the parameter's value is 9 or 903 or 241 the function returns 9, 093 or 241 respectively.

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