Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

FYI: Please Use Pseudocode. (Like the example provided at the end of the question)

I
empID: String
firstName: String
lastName: String
payRate: Real
Employee
SetEmpID(theID: String)
SetFirstName(fName: String)
SetLastName(IName: 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:
Employee
The ID has to be 4 characters long. 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 characters. If invalid the
first or last name have to be replaced with XXXX.
The pay rate has to be between 0 and 1000000. If invalid the pay rate has to be replaced with 0.
Use the ValidString Function to validate the first name, last name and emplD. 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 Display Employee 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
expand button
Transcribed Image Text:I empID: String firstName: String lastName: String payRate: Real Employee SetEmpID(theID: String) SetFirstName(fName: String) SetLastName(IName: 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: Employee The ID has to be 4 characters long. 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 characters. If invalid the first or last name have to be replaced with XXXX. The pay rate has to be between 0 and 1000000. If invalid the pay rate has to be replaced with 0. Use the ValidString Function to validate the first name, last name and emplD. 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 Display Employee 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
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education