Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this c# yes i need help on writting the code Employee Class Create an application with a class named Employee, which contains the following: Private

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
this c#
yes i need help on writting the code
Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee's name, ID number, department, and position of appropriate data type Constructor which does not receive any arguments and initializes the private fields to the appropriate value Parameterized Constructor which receives four arguments and assigns the values to the private fields Properties which get and ser the values of the corresponding private fields The application should contain a Main form which allows the user to enter the employee's name, ID number, department, and position. An Employee object should be instantiated and the values entered by the user should be assigned to the private fields of the object using either the Parameterized Constructor or the Properties. The Add Employee button should add the Employeee objects to a List object and each employee's name should be displayed in a list box on the Main form. The Add Employee button should also clear the text boxes and set the focus to the Name text box. All information is REQUIRED and a message should be displayed if any text box is left blank and focus should return to the text box. Additionally, the ID number should be validated to ensure appropriate data type (ie, whole number) and that it is greater than zero. In each case of invalid data, a message should be displayed, the text box cleared, and focus set back to the text box causing the error. The Clear button should clear ALL the controls on the form and set the focus to the Name text box. A sample Main Form and sample Message Boxes are provided below: Employee Information - O x Name cannot be blank. ID Number must be a whole number Department cannot be blank. ID Number Department OK DOK Postion Number must be greater than Position cannot be blank. OK Employee Information - O Name ID Number must be a whole number Name cannot be blank. Department cannot be blank. ID Number Department DOK OK OK ID Number must be greater than tero Position cannot be blank. OK Add OK When the user selects a name from the list box, a second form (provide a descriptive name) should appear displaying that employee's name, ID Number, department, and position by referencing the Employee objects that have been added to the List object as shown in the sample second form shown below (hint: be sure and utilize the Properties): Employee Details - 0 X Employee Details - D X Employee Details - D X Name Susan Meyers Name Mark Jones Name Joy Rogers ID Number 47899 ID Number 39119 ID Number 81774 Department Accounting Department Department Manufacturing Position Vice President Position Programmer Poulion Engineer Dose Done IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls (e.g., labels, text boxes, etc.) on that form. Controls that are placed on a form have Private access by default. In order for code that is outside the form's class to access controls on that form the Modifiers nronerty MUST he changed to Public See the Create Multiple Farms Hi Aab01 Pro A B Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee's name, ID number, department, and position of appropriate data type Constructor which does not receive any arguments and initializes the private fields to the appropriate value Parameterized Constructor which receives four arguments and assigns the values to the private fields Properties which ger and set the values of the corresponding private fields The application should contain a Main form which allows the user to enter the employee's name, ID number, department, and position. An Employee object should be instantiated and the values entered by the user should be assigned to the private fields of the object using either the Parameterized Constructor or the Properties. The Add Employee button should add the Employeee objects to a List object and each employee's name should be displayed in a list box on the Main form. The Add Employee button should also clear the text boxes and set the focus to the Name text box. All information is REQUIRED and a message should be displayed if any text box is left blank and focus should return to the text box. Additionally, the ID number should be validated to ensure appropriate data type (ie, whole number) and that it is greater than zero. In each case of invalid data, a message should be displayed, the text box cleared, and focus set back to the text box causing the error. The Clear button should clear ALL the controls on the form and set the focus to the Name text box. A sample Main Form and sample Message Boxes are provided below: Employee Information - O x Name cannot be blank ID Number must be a whole number Department cannot be blank ID Number Department OK DOK Postion Number must be greater than Position cannot be blank. TOK Employee Details Employee Details Employee Details Name Name Mark Jones Name Susan Meyers 47899 Joy Rogers 81774 ID Number ID Number 39119 ID Number Department Accounting Department Department Manufacturing Position Vice President Position Programmer Position Engineer Dose Cose Cose IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls (e.g., labels, text boxes, etc.) on that fe Controls that are placed on a form have Private access by default. In order for code that is outside the form's clas! access controls on that form the Modifiers property MUST be changed to Public. See the Create Multiple Form video demonstration under the Module 1: Videos link in Module 1: Classes and Multiform Projects (Chapter the Modules page for a lab-related example. An alternative is to pass the List object as an argument to the form the Pets Project Multiple Forms VO2 Completed project under the Examples and Exercises heading in Modu The program MUST include standard features of a Windows application including: Change the default Text property of the forms to something descriptive Appropriate naming conventions for all controls (i.e., buttons, labels, text boxes, list, list box) Buttons with appropriate name and standard keyboard access key AcceptButton and CancelButton properties should be appropriately assigned to the Add Employee button a Clear button, respectively Ensure tab order for form is logical Appropriate naming conventions and data type declarations for variables Remove all unused event handlers from the program code Employee Details Employee Details Employee Details Name Susan Meyers Name Mark Jones Name Joy Rogers 81774 ID Number 47099 ID Number 39119 ID Number Department Accounting Department Department Manufacturing Position Vice President Position Programmer Position Engineer ose Close IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls (e.g., labels, text boxes, etc.) on that fe Controls that are placed on a form have Private access by default. In order for code that is outside the form's class access controls on that form the Modifiers property MUST be changed to Public. See the Create Multiple Form video demonstration under the Module 1: Videos link in Module 1: Classes and Multiform Projects (Chapter the Modules page for a lab-related example. An alternative is to pass the List object as an argument to the form the Pets Project Multiple Forms VO2 Completed project under the Examples and Exercises heading in Modu The program MUST include standard features of a Windows application including: Change the default Text property of the forms to something descriptive Appropriate naming conventions for all controls (i.e., buttons, labels, text boxes, list, list box) Buttons with appropriate name and standard keyboard access key AcceptButton and CancelButton properties should be appropriately assigned to the Add Employee button a Clear button, respectively Ensure tab order for form is logical Appropriate naming conventions and data type declarations for variables Remove all unused event handlers from the program code Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee's name, ID number, department, and position of appropriate data type Constructor which does not receive any arguments and initializes the private fields to the appropriate value Parameterized Constructor which receives four arguments and assigns the values to the private fields Properties which get and ser the values of the corresponding private fields The application should contain a Main form which allows the user to enter the employee's name, ID number, department, and position. An Employee object should be instantiated and the values entered by the user should be assigned to the private fields of the object using either the Parameterized Constructor or the Properties. The Add Employee button should add the Employeee objects to a List object and each employee's name should be displayed in a list box on the Main form. The Add Employee button should also clear the text boxes and set the focus to the Name text box. All information is REQUIRED and a message should be displayed if any text box is left blank and focus should return to the text box. Additionally, the ID number should be validated to ensure appropriate data type (ie, whole number) and that it is greater than zero. In each case of invalid data, a message should be displayed, the text box cleared, and focus set back to the text box causing the error. The Clear button should clear ALL the controls on the form and set the focus to the Name text box. A sample Main Form and sample Message Boxes are provided below: Employee Information - O x Name cannot be blank. ID Number must be a whole number Department cannot be blank. ID Number Department OK DOK Postion Number must be greater than Position cannot be blank. OK Employee Information - O Name ID Number must be a whole number Name cannot be blank. Department cannot be blank. ID Number Department DOK OK OK ID Number must be greater than tero Position cannot be blank. OK Add OK When the user selects a name from the list box, a second form (provide a descriptive name) should appear displaying that employee's name, ID Number, department, and position by referencing the Employee objects that have been added to the List object as shown in the sample second form shown below (hint: be sure and utilize the Properties): Employee Details - 0 X Employee Details - D X Employee Details - D X Name Susan Meyers Name Mark Jones Name Joy Rogers ID Number 47899 ID Number 39119 ID Number 81774 Department Accounting Department Department Manufacturing Position Vice President Position Programmer Poulion Engineer Dose Done IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls (e.g., labels, text boxes, etc.) on that form. Controls that are placed on a form have Private access by default. In order for code that is outside the form's class to access controls on that form the Modifiers nronerty MUST he changed to Public See the Create Multiple Farms Hi Aab01 Pro A B Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee's name, ID number, department, and position of appropriate data type Constructor which does not receive any arguments and initializes the private fields to the appropriate value Parameterized Constructor which receives four arguments and assigns the values to the private fields Properties which ger and set the values of the corresponding private fields The application should contain a Main form which allows the user to enter the employee's name, ID number, department, and position. An Employee object should be instantiated and the values entered by the user should be assigned to the private fields of the object using either the Parameterized Constructor or the Properties. The Add Employee button should add the Employeee objects to a List object and each employee's name should be displayed in a list box on the Main form. The Add Employee button should also clear the text boxes and set the focus to the Name text box. All information is REQUIRED and a message should be displayed if any text box is left blank and focus should return to the text box. Additionally, the ID number should be validated to ensure appropriate data type (ie, whole number) and that it is greater than zero. In each case of invalid data, a message should be displayed, the text box cleared, and focus set back to the text box causing the error. The Clear button should clear ALL the controls on the form and set the focus to the Name text box. A sample Main Form and sample Message Boxes are provided below: Employee Information - O x Name cannot be blank ID Number must be a whole number Department cannot be blank ID Number Department OK DOK Postion Number must be greater than Position cannot be blank. TOK Employee Details Employee Details Employee Details Name Name Mark Jones Name Susan Meyers 47899 Joy Rogers 81774 ID Number ID Number 39119 ID Number Department Accounting Department Department Manufacturing Position Vice President Position Programmer Position Engineer Dose Cose Cose IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls (e.g., labels, text boxes, etc.) on that fe Controls that are placed on a form have Private access by default. In order for code that is outside the form's clas! access controls on that form the Modifiers property MUST be changed to Public. See the Create Multiple Form video demonstration under the Module 1: Videos link in Module 1: Classes and Multiform Projects (Chapter the Modules page for a lab-related example. An alternative is to pass the List object as an argument to the form the Pets Project Multiple Forms VO2 Completed project under the Examples and Exercises heading in Modu The program MUST include standard features of a Windows application including: Change the default Text property of the forms to something descriptive Appropriate naming conventions for all controls (i.e., buttons, labels, text boxes, list, list box) Buttons with appropriate name and standard keyboard access key AcceptButton and CancelButton properties should be appropriately assigned to the Add Employee button a Clear button, respectively Ensure tab order for form is logical Appropriate naming conventions and data type declarations for variables Remove all unused event handlers from the program code Employee Details Employee Details Employee Details Name Susan Meyers Name Mark Jones Name Joy Rogers 81774 ID Number 47099 ID Number 39119 ID Number Department Accounting Department Department Manufacturing Position Vice President Position Programmer Position Engineer ose Close IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls (e.g., labels, text boxes, etc.) on that fe Controls that are placed on a form have Private access by default. In order for code that is outside the form's class access controls on that form the Modifiers property MUST be changed to Public. See the Create Multiple Form video demonstration under the Module 1: Videos link in Module 1: Classes and Multiform Projects (Chapter the Modules page for a lab-related example. An alternative is to pass the List object as an argument to the form the Pets Project Multiple Forms VO2 Completed project under the Examples and Exercises heading in Modu The program MUST include standard features of a Windows application including: Change the default Text property of the forms to something descriptive Appropriate naming conventions for all controls (i.e., buttons, labels, text boxes, list, list box) Buttons with appropriate name and standard keyboard access key AcceptButton and CancelButton properties should be appropriately assigned to the Add Employee button a Clear button, respectively Ensure tab order for form is logical Appropriate naming conventions and data type declarations for variables Remove all unused event handlers from the program code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

Be able to differentiate between arbitration and mediation

Answered: 1 week ago

Question

Understand how arbitrators are credentialed and selected

Answered: 1 week ago

Question

Appreciate the advantages of arbitration

Answered: 1 week ago