Computer Science homework help

Computer Science homework help.  

Employee
–           empID: String
–           firstName: String
–           lastName: String
–           payRate: Real
+      Employee()
–           SetEmpID(theID: String)
–           SetFirstName(fName: String)
–           SetLastName(lName: String)
–           SetPayRate(testPay: Real)
–           ValidString(testString: String, validMin: Integer, validLength: Integer, txtMSG: String):String
–           ValidPay(pay: Real): Real
+      DisplayEmployee():String

 
Create an employee class based on this UML class diagram.
The setters should prompt the user for the information to set the value of the instance variables. These are the validation rules:

  • The ID has to be 4 characters If it is invalid the characters XXXX have to replace the invalid ID.
  • The minimum length for a first or last name is 2 characters and the maximum length is 20 If invalid the first or last name have to be replaced with XXXX.
  • The pay rate has to be between 0 and If invalid the pay rate has to be replaced with 0.

 
Use the ValidString Function to validate the first name, last name and empID. The invalid message should include which item was incorrect. For example if the first name was incorrect it should display “Invalid first name. Set to XXXX”
 
The DisplayEmployee getter function should display all of the employee information.
 
Create a program that uses the Employee class to create an array of employee objects based on the user’s input. It should then display all of the employee data in the array.
 
 
Example: Module main()
 
 
Declare Integer employeeNo
 
 
Display “How many employees do you want to enter?” Input employeeNo

Computer Science homework help

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.