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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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