Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C# Program language please BCIS 3343 Lab 01 Problem Statement Employee Class Create an application with a class named Employee, which contains the following: Private
C# Program language please
BCIS 3343 Lab 01 Problem Statement 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 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 (i.e., 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: Employce Information - 0 X Name ID Number must be a whole number. Name cannot be blank. Department cannot be blank. ID Number LOK Department Postion LOK TOK ID Number must be greater than zero Position cannot be blank Add Cleo Edit LOK 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 E mployee Details - D X | Employee Details - 0 X Name Susan Meyers Name Mark Jones Name Joy Rogers ID Number 47899 ID Number 39119 ID Number 81774 Department Accounting Department Department Manufacturing Postion Vice President Postion Programme Position Engineer Close Close 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 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 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 argument to the form (see the Pets Project Multiple Forms V02 Completed project under the Examples and Exercises heading in Module 1). 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 and 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 codeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started