Your assignment 3 is based on Pages 400-401 in your text (blue color cover). If you are using the customized version of the text, the page # may be different but I have copied the question and showed it on the second page.
Name your project as xxxxAS3 where xxxx is your first and last names. Any other project name will cost you marks.
Do NOT wait till next week to start this assignment or you may end up not being able to complete it at all.
Please keep in mind that your data file does not have the push-button code. This code must be generated when the data are read in. The search for the matching data must be done on the array of structures, not on the data file.
Start writing the program with the following specifications.
The data file to be used is called newEmployees.txt. This data file is in csv format. Your program accesses this file in C:\temp. This file is opened once and then closed after the data have been loaded.
Create a function called GetCode. This function receives one character (3 char from the last name and 1 char from the first name) at a time and translates the passed-down character into the push-button code. This push-button code will be passed back to your calling procedure. Once all the 4 codes (1 from each of the 4 characters) have been generated, they will be stored in the array of structures for later searching purpose.
You have to use dynamic array of structures for this assignment.
Provide appropriate internal documentation in your program. If you have any questions, please email me.
Option strict and explicit must be turned on.
No computations on controls
Proper naming convention must be followed on controls and variables, including the arrays.
Data file is opened once in the form load event and will not be opened again anywhere else in your program.
Provide adequate internal documentations/comments in your source codes to explain your processing logics.
You must work on your program individually. Not co-operation in completing this assignment.
Zip up your program and send it over to me. You must use either Winzip or Windows? compressed folder utility to zip up your program. Please do NOT use WinRAR or you will receive zero mark in this assignment.
The subject line in your email should be read as xxxxx VB AS3
You need to replace xxxxx with your own name (first name and then last name). If your subject line is incorrect, your email will be deleted automatically or treated as spam. In other words, I may not receive it at all. You will also get marks deducted for the wrong subject line.
User- Operated Directory Assistance. Have you ever tried to call a person at their business and been told to type in some of the letters of their name on your telephones keypad in order to obtain their extension? Write a program to simulate this type of directory assistance.
Suppose the names and telephone extensions of all the employees of a company are contained in the text file newEMPLOYEES.TXT. Each line of the file has the three pieces of information: last name, first and middle name( s), and telephone extension. They are separated by a comma, thus called csv (comma separated value) format.
The user should be asked to press buttons for the first three letters of the person?s last name followed by the first letter of the first name. For instance, if the person?s name is Gary Land, the user would type in 5264. The number 5264 is referred to as the push-button encoding of the name. (Note: People with different names can have the same push-button encoding for instance, Herb James and Gary Land.) The program should declare an array of structures to hold full names, extensions, and push-button encodings. The array should be filled while making a single pass through the file and then sorted by push-button encoding. After the user presses four keys on the keypad, the program should automatically display the names and extensions of all the employees having the specified push-button encoding. See the figure below.
Bookmarks