Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 Parametered Constructor which receives four arguments and assigns the values to the private fields Properties which ger and see the values of the corresponding private fields The application should contain a Main form which allows the user to the comple's name, ID number department, and position. An Employee object should be instantiated and the values entered by the should be assigned to the private fields of the object using either the Parame d Constructor or the Properties. The Add Employwe button should add the Employees 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 test boses and set the faces 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 cie, whole number and that it is greater than rere. In cach case of invalid data, a message should be displayed, the extbox cleared, and focusset back to the text box causing the error. The Clear we 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 belo 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 aded to the List object as shown in the sample second form shown below (hint be sure and while the properties Sa ry IMPORTANT: Accessing Controls on a Different Form It is possible for code that is outside the form's class to access the controls el s text boxes 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 the form 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 ) 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 Voz Completed project under the Examples and Exercises heading in Module The program MUST include standard features of a Windows application including: . Change the de T ext property of the forms to something descriptive . Appropriate naming Conventions for all controls (ie, buttons Labels, text boxes, list, list box) Bons with appropriate and standard keyboard access key AcceptButton and CancelButton properties should be appropriately assigned to the Add Employee button and Clear bu 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 with AI-Powered 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

Students also viewed these Databases questions