timmins316
Member
- Joined
- Feb 9, 2005
- Messages
- 6
- Programming Experience
- Beginner
I need help on a project for school.
The program specifications are as follows. Now I don't want complete help I want links that'll help me understand what I need to do. Please and thank you.
Design a Visual Basic.Net application for a casino. Your job is to write a simple version of an employee management system. The program will allow the user to enter employee information. The user will be able to create a new file or load an existing one. The user can cycle through the employees or add a new employee. A simple report will be generated to display employee data.
Code Module
Data will be stored in 4 parallel data arrays. Inside a code module, declare public variables:
1.Four data arrays: Names, Salaries, DOB (for date of birth) and Pension.
2.conMaxPeople. Set the maximum number of employees to 25. Do not allow the user to exceed 25 employees.
3.intNumberOfPeople keeps track of the current number of employees.
The First Form: Form Controls
1.Add a large Title label to the form. Add a large group box. Inside the group box add:
•Name and Salary labels and textboxes.
•Date of birth label and date time picker.
•Pension plan check box.
•5 command buttons:
oPrevious (access key Alt-P): load the previous record.
oNext (access key Alt-N): load the next record. Make this the form’s AcceptButton.
oAdd (access key Alt-A)
oReport (access key Alt-R)
oExit (access key Alt-X).
2.Set the Visible property of the GroupBox to False. After the user has successfully specified a file, set the Visible property of the GroupBox to True.
3.Add a File menu containing New (shortcut key Ctrl-N), Open (shortcut key Ctrl-O) and Exit choices.
4.Add a OpenFileDialog control.
5.Add a SaveFileDialog control.
The First Form: Code
Declare the following module level variables:
1.intCurrentIndex: this variable records which record you are on. For example, if you are currently displaying the 4th record, then intCurrentIndex is 3.
2.strCurrentFileName
3.blnFileDefined: has a file been defined yet.
Code the following procedures:
1.InitializeArray: write a For loop to assign empty data to the arrays. You can assign the date to January 1, 1900.
2.FileNewMenu Click. The File New menu provides the user with a dialog box to enter a filename. Once a valid filename has been entered, open the file for output then close it. This will create the file with 0 bytes. Next, call procedure InitializeArray.
3.SaveControlsToArray: using the arrays and intCurrentIndex, copy the control data to the current record.
4.LoadControls: fill the controls with the values in the current record.
5.NextButton Click. Include calls to SaveControlsToArray and LoadControls.
6.PreviousButton Click.
7.ResetControls: set the controls to an initial value. The date time picker can be set to today’s date.
8.AddButton Click. Prompt the user with 4 InputBoxes to allow them to enter the values for the new record. Add the new values to the arrays. Display the new record in the controls.
9.SaveArrayToFile: write the array contents to the user defined file.
10.FillArrayFromFile: open the user defined file for input. Load the data from the file in to the arrays. Count the number of people and store in intNumberOfPeople.
11.FileOpenMenu Click.
Code the Validating event of the Name and Salary textboxes. Validate the Name to be non blank and the Salary to be greater than 10000. The Validating event works in a similar fashion to the Closing event. When the data is invalid, set the value of e.Cancel to True.
The Second Form
Add a second form. This form will display all employee data. Add a title and 2 large labels to the form. Code the Load event to display all array data in the 2 labels:
1.Set the font of the labels:
DataLabel1.Font = New System.Drawing.Font("Comic Sans MS", 10, FontStyle.Bold)
DataLabel2.Font = New System.Drawing.Font("Comic Sans MS", 10, FontStyle.Bold)
2.Code 1 For loop. Plan the loop well so the code is efficient. There should only be 10 lines of code between the For line and the Next line.
Notes
1.The title bar should show the drive, path and filename followed by a hyphen and the application name.
2.Make sure that all data is saved. You need to think of all scenarios. For example, save the control data when moving to a different record or changing filenames. Do not ask the user if they want to save, just save the data.
The program specifications are as follows. Now I don't want complete help I want links that'll help me understand what I need to do. Please and thank you.
Design a Visual Basic.Net application for a casino. Your job is to write a simple version of an employee management system. The program will allow the user to enter employee information. The user will be able to create a new file or load an existing one. The user can cycle through the employees or add a new employee. A simple report will be generated to display employee data.
Code Module
Data will be stored in 4 parallel data arrays. Inside a code module, declare public variables:
1.Four data arrays: Names, Salaries, DOB (for date of birth) and Pension.
2.conMaxPeople. Set the maximum number of employees to 25. Do not allow the user to exceed 25 employees.
3.intNumberOfPeople keeps track of the current number of employees.
The First Form: Form Controls
1.Add a large Title label to the form. Add a large group box. Inside the group box add:
•Name and Salary labels and textboxes.
•Date of birth label and date time picker.
•Pension plan check box.
•5 command buttons:
oPrevious (access key Alt-P): load the previous record.
oNext (access key Alt-N): load the next record. Make this the form’s AcceptButton.
oAdd (access key Alt-A)
oReport (access key Alt-R)
oExit (access key Alt-X).
2.Set the Visible property of the GroupBox to False. After the user has successfully specified a file, set the Visible property of the GroupBox to True.
3.Add a File menu containing New (shortcut key Ctrl-N), Open (shortcut key Ctrl-O) and Exit choices.
4.Add a OpenFileDialog control.
5.Add a SaveFileDialog control.
The First Form: Code
Declare the following module level variables:
1.intCurrentIndex: this variable records which record you are on. For example, if you are currently displaying the 4th record, then intCurrentIndex is 3.
2.strCurrentFileName
3.blnFileDefined: has a file been defined yet.
Code the following procedures:
1.InitializeArray: write a For loop to assign empty data to the arrays. You can assign the date to January 1, 1900.
2.FileNewMenu Click. The File New menu provides the user with a dialog box to enter a filename. Once a valid filename has been entered, open the file for output then close it. This will create the file with 0 bytes. Next, call procedure InitializeArray.
3.SaveControlsToArray: using the arrays and intCurrentIndex, copy the control data to the current record.
4.LoadControls: fill the controls with the values in the current record.
5.NextButton Click. Include calls to SaveControlsToArray and LoadControls.
6.PreviousButton Click.
7.ResetControls: set the controls to an initial value. The date time picker can be set to today’s date.
8.AddButton Click. Prompt the user with 4 InputBoxes to allow them to enter the values for the new record. Add the new values to the arrays. Display the new record in the controls.
9.SaveArrayToFile: write the array contents to the user defined file.
10.FillArrayFromFile: open the user defined file for input. Load the data from the file in to the arrays. Count the number of people and store in intNumberOfPeople.
11.FileOpenMenu Click.
Code the Validating event of the Name and Salary textboxes. Validate the Name to be non blank and the Salary to be greater than 10000. The Validating event works in a similar fashion to the Closing event. When the data is invalid, set the value of e.Cancel to True.
The Second Form
Add a second form. This form will display all employee data. Add a title and 2 large labels to the form. Code the Load event to display all array data in the 2 labels:
1.Set the font of the labels:
DataLabel1.Font = New System.Drawing.Font("Comic Sans MS", 10, FontStyle.Bold)
DataLabel2.Font = New System.Drawing.Font("Comic Sans MS", 10, FontStyle.Bold)
2.Code 1 For loop. Plan the loop well so the code is efficient. There should only be 10 lines of code between the For line and the Next line.
Notes
1.The title bar should show the drive, path and filename followed by a hyphen and the application name.
2.Make sure that all data is saved. You need to think of all scenarios. For example, save the control data when moving to a different record or changing filenames. Do not ask the user if they want to save, just save the data.