Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

To do: EMPLOYEE AND EMPLOYEEDRIVER
prepare a class named Employee that has the following instance variables:
• name. A String object that holds the employee's name
• idNumber. An int variable that holds the employee's ID number
• department. A String object that holds the name of the department where the employee works
• position. A String object that holds the employee's job title.
The class should have the following constructors (note - we will only use the first one in our ex data, but remember - this is a blue print that can be used in many applications. Other applications might use the other constructors):
• A full constructor that has parameters for all four instance variables
• A constructor that takes in the name and id and sets these values. It sets the department and position to a blank (" ");
• A no-argument constructor 
prepare your getters and setters and your toString() method.

prepare a driver program named EmployeeDriver that creates the following three employees by calling the full constructor. Then have it print each of them out by calling the toString() method.

Name ID Department Position
Mike Miller 78655 Accounting President
Sam Jones 76798 IT Programmmer
Sally Rogers 98745 Technical Support Help Desk Technician



To do: CAR AND CARDRIVER
prepare a class named Car that has the following instance variables:
• year - an int field that has the model year for the car
• make - A String object that holds the make of the car
• speed - an int field that holds the car's current speed
The class should have the following constructors:
• a full constructor where all values are passed in
• a constructor where the year and make are passed in and the speed is set to zero
• a no-argument constructor 
prepare your getters and setters and your toString() method.
prepare the following methods (I will help you if you need me to - post a note in the discussion forum)
• accelerate() - this method should add five miles to the speed each time it is called. Since this is a constant 5 miles per hour, that should be a constant in the method and there are no need for parameters.
• brake() - this method should subtract ten miles from the speed each time it is called. Since this is a constant 5 miles per hour, that should be a constant in the method and there are no need for parameters.

prepare the CarDriver program that creates a Car object calling the full constructor (you can choose values for the arguments). Call the accelerate() method five times and print just the speed after each method call. Call the brake() method once. Then call the toString() method to print out the Car instance.


To do: PAYROLL AND PAYROLLDRIVER
prepare a Payroll and PayrollDriver class. The Payroll instance variables should be the employeee's name, ID, hourly pay rate, and number of hours worked. You decide appropriate variable names and data types. prepare a full and no-argument constructor, your getters and setters, and a toString() method. prepare a method named grossPay() that find outs and returns the gross amount paid. In the Driver, create two instances of the Payroll class. With the first one, call the full constructor (you can use whatever values you like). For the second one, use the no-argument constructor followed by the setters to set the field values (you can use whatever values you like). Call the toString() method to print each out. Also call the grossPay() method and print out the employee's gross pay. Make certain it is formatted like money.
See Moneyex.java.


Your jar file that you submit needs to be named dwolffmod2.jar (except your name). It must have one package in it named dwolffmod2 (except your name). There should be exactly ten programs in the package: Changes you should have made in this module:
SoftwareSales
ShippingCharges
Book and BookDriver
Employee and EmployeeDriver
Car and CarDriver
Payroll and PayrollDriver

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M994919

Have any Question?


Related Questions in Computer Engineering

Bob is interested in studying whether the average household

Bob is interested in studying whether the average household income in city A is lower than the national benchmark, μ 0  = $51,500. He collects income information from a random sample of 100 households, conducts a one-sam ...

What is the sum after execution assume that min and max are

What is the SUM after execution? Assume that MIN and MAX are integers provided provided by the user, and that MAX is greater than MIN. (Solve without choosing actual values) INPUT MIN, MAX SUM= 0 DOFOR M= MIN, MAX SUM= S ...

Suppose in your company you formulate a python script that

Suppose in your company you formulate a Python script that inserts, updates, and deletes data in tables in a MySQL database. You post your Python script on a shared drive for other staff members to use. What are some the ...

Question you are required to sort a file containing

Question : You are required to sort a file containing integers between 0 and 999999. You cannot afford to use one million pigeon-holes, so you decide instead to use one thousand pigeon-holes numbered from 0 to 999. You b ...

Question you can transfer your health data to another

Question: You can transfer your health data to another personal health record provider such as Microsoft HealthVault. What privacy issues are involved? Express your views on using this type of system, make sure to includ ...

Suppose that you have a database of three-dimensional

Suppose that you have a database of three-dimensional galaxy coordinates x; y; z that covered a large volume of, say, 3 Gpc 3 Gpc 3 Gpc. Using your skill and judgement, suggest how you might use the data to test whether ...

What is a survey and pros and cons of using this method to

What is a Survey and pros and cons of using this method to collect data are? Have you done a survey? How successful were your results?

A new machine averages 4 clock cycles per instruction and

A new machine averages 4 clock cycles per instruction, and runs at a system clock of 20 MHz. The Axiom-Verge algorithm set to benchmark the system will take an even 3000 instructions to complete. a) Knowing how many cloc ...

Case study - social media research facilitytaskthis

Case study - Social Media Research facility Task This assignment follows from the case study used in Assessment . For the same case study, complete the following tasks by creating the following: WBS first using indented ...

Given the following table keynbspand fds repair

Given the following table, key and FDs, REPAIR (RepairInvoiceNumber, RepairDate, RepairCost, RepairEmployeeName, RepairEmployeePhone, SerialNumber, Type, TankCapacity) Candidate Keys: RepairInvoiceNumber, and (RepairDate ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As