Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help me coding this using C# Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee'

help me coding this using C#
image text in transcribed
image text in transcribed
Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee' m, ID m . dpa t and rest of appropriate data type Construct which does not receive any arguments and initialies the private fields to the appropriate value Parum Constructor which receives for arguments and assigns the values to the private fields Properties which gefand ser the values of the corresponding private fields The application should contain a Main form which allows the enter the employee's me. D umber department and position. An Employee object should be stated and the value ofered by the should be assigned to the private fields of the object in cither the Parum Cent r o the Pre s The Employee button should add the teployees objects to a list object and each employee's names be displayed in a list besoe the Main form. The Ad Employeuse should also clear the tout bones and the focus to the Name text box. All information is REQUIRED and a message should be displayed if my text box is left Nank and focus should return to the text box. Additionally, the ID number should be validated to ensure appropriate data type the whole and that it is greater than we in each case of invalid data message should be displayed, the text box cleared and focus hack to the text box using the error. The Clear 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 When the user selects a name from the list box, a second form provide a descriptive we 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 the sure and wilise the Properties IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls labels text es on that form Controls that are placed on a formave Private access by default. In order for code that is outside the form's class to access controls on that for the Modifier property MUST be changed to Public See the Create Multiple Forms video demonstration under the Module 1: Videos link in Module 1: Classes and Multiform Projects (Chapter 9) on the Modules page for a lab-related example. An alternative is to pass the List object as an aument to the form (see the Pets Project Multiple Forms VO: Completed project under the Examples and Exercises heading in Module The program MUST include standard features of a Windows application including Change the default Text property of the forms to something descriptive . Appropriate conventions for all controls (ie, but he text boxes, list, ist box) B ons with appropriate a nd sandard keyboard access key . AcceptButton and Cancel Button properties should be appropriately assigned to the Add Employee button and Clear buton respectively Estab oder for form is logical . Appropriate aming eventions and data type declarations for variables Remove all event handlers from the program code This lab relates to the following Skill Outcome: Students will create advanced object-oriented applications This lab covers the material in Chapter 10. The purpose of this lab is to demonstrate the creation of a class and to instantiate an object of that class and implement it into an application. The lab also involves storing objects in a List and accessing the members of that object to be displayed using a multi- form project 1. Complete the programming problem provided in the attached document entitled, Employee Class Create an application with a class named Employee, which contains the following: Private fields for an employee' m, ID m . dpa t and rest of appropriate data type Construct which does not receive any arguments and initialies the private fields to the appropriate value Parum Constructor which receives for arguments and assigns the values to the private fields Properties which gefand ser the values of the corresponding private fields The application should contain a Main form which allows the enter the employee's me. D umber department and position. An Employee object should be stated and the value ofered by the should be assigned to the private fields of the object in cither the Parum Cent r o the Pre s The Employee button should add the teployees objects to a list object and each employee's names be displayed in a list besoe the Main form. The Ad Employeuse should also clear the tout bones and the focus to the Name text box. All information is REQUIRED and a message should be displayed if my text box is left Nank and focus should return to the text box. Additionally, the ID number should be validated to ensure appropriate data type the whole and that it is greater than we in each case of invalid data message should be displayed, the text box cleared and focus hack to the text box using the error. The Clear 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 When the user selects a name from the list box, a second form provide a descriptive we 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 the sure and wilise the Properties IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls labels text es on that form Controls that are placed on a formave Private access by default. In order for code that is outside the form's class to access controls on that for the Modifier property MUST be changed to Public See the Create Multiple Forms video demonstration under the Module 1: Videos link in Module 1: Classes and Multiform Projects (Chapter 9) on the Modules page for a lab-related example. An alternative is to pass the List object as an aument to the form (see the Pets Project Multiple Forms VO: Completed project under the Examples and Exercises heading in Module The program MUST include standard features of a Windows application including Change the default Text property of the forms to something descriptive . Appropriate conventions for all controls (ie, but he text boxes, list, ist box) B ons with appropriate a nd sandard keyboard access key . AcceptButton and Cancel Button properties should be appropriately assigned to the Add Employee button and Clear buton respectively Estab oder for form is logical . Appropriate aming eventions and data type declarations for variables Remove all event handlers from the program code This lab relates to the following Skill Outcome: Students will create advanced object-oriented applications This lab covers the material in Chapter 10. The purpose of this lab is to demonstrate the creation of a class and to instantiate an object of that class and implement it into an application. The lab also involves storing objects in a List and accessing the members of that object to be displayed using a multi- form project 1. Complete the programming problem provided in the attached document entitled

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_2

Step: 3

blur-text-image_3

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions