Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Can someone please help me with coding this using Visual Basic? ISC/TE 285 Chapter 5 & 7 Programming Project Due Date: February 24, 2020 by

Can someone please help me with coding this using Visual Basic?
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
ISC/TE 285 Chapter 5 & 7 Programming Project Due Date: February 24, 2020 by 11:55 pm This program will be used to track the seats available for the current semester's SoC courses. The data for each class is to be entered into a text file named "Courses.txt" which should be stored in the project's Bin/Debug folder. Your file should consist of at least 12 records that contain a variety in the data values. Fields that make up each record in the "Courses.txt" file will be: Course Id - Section Id Instructor (First Last) Capacity Current Enrollment Examples of Records stored in "Courses.txt" are shown below: CISI 15.101.Paul Overstreet.25.25 CIS115,102.Paul Overstreet.25.20 CIS115,501,Ocllo Robinson.25.18 ISC285.101. Melissa Smith,30,28 ISC285,501, Melissa Smith.30.25 CIS300.801. Melissa Smith,30,30 CIS300,802 Melis Smith 30.10 CIS324,101,Ocllo Robinson,25,22 This project will have one Class level array variable: "courses". All other variables must be local to the module(s) where they are used and "Passed from one module to another via arguments and parameters where needed. Populating the courses array: You may populate the array from the text file when it is created or at Load time. Display Array Button Click Event: This button click event should clear the output listbox and display a meaningful header along with all elements from the courses array exactly as they are stored. Note: This event was included primarily to help your instructor at grading time so don't format the output: just display each element as it appears in the array. Add Record Button Click Event: Before the body of this event is executed, the following data validations should be performed. The Boolean function AddDataOK should be use when coding this validation o Insure that the Course id textbox isn't empty. Insure that the Section textbox isn't empty. Insure that the Capacity textbox contains a numeric value. o Insure that the Current Enrollment textbox contains a numeric value. o insure that an Instructor's name has been selected from the faculty listbox. Read the values for all five fields into variables from the textboxes and/or listbox in a GetAddInput Sub. Use a Create Record function, to create a csv record from the input which will be added to the end of the array. Use a Write Record subprocedure to insert a new element at the bottom of the courses array and write the newly created record into that position of the array. Call and execute the Display AddOutput subprocedure to provide the user with the following information (always clear your output listbox prior to displaying new, unrelated information and format your output for readability: o Header line O Blank line o Detail line showing the record that was added to the array, Delete Record Button Click Event: Before the body of this event is executed, the following data validations should be performed. The Boolean function DeleteDataOK should be use when coding this validation o Insure that the course id textbox isn't empty. Insure that the section textbox isn't empty. Using a GetDeleteInput Sub, read in the two required values. Knowing that the Course Id and section fields combined will create a unique record identifier, within Function Record Subscript search the array to locate the record that needs to be deleted. Return the subscript value for the array element that holds the record to be deleted or if the requested record isn't found. If the record is found, execute subprocedure DeleteRecord to remove the record from the array and update the array to remove the last record from the array. Execute subprocedure Display DeleteOutput which should use a similar output format as used in Display AddOutput. This output should show the Course ld and Section of the record that was deleted. If the requested record wasn't found, a message should be displayed in the listbox to let the user know. Enrollment Count for Course Ouery Button Click Event: This event must use a LINQ to answer the question, 'how many students are currently enrolled in all sections of the selected course id'. There may be multiple sections of the same course being taught. This query is to work with all records with the given Course Id and the output is to be put in descending enrollment order. Before executing the event, validate that the Course Id textbox isn't Wank and that the array contains records (CourseDataOK function). Subprocedure GetCourse should be used to read in the requested Course Id from the textbox. The query can be created within the button click event itself and the query output should include two separate fields (multiple field output) Faculty Member (Reformatted to include only the first initial underscore, last name) - ReformatName function (Example of output P_Overstreet) - Current Enrollment The output should include a meaningful header and display the reformatted name and current enrollment fields for cach record in the query result. Since we are working directly with the query result in this event, the output will be handled in the event procedure itself rather than in a subprocedure. A total of how many students are currently registered for all sections of the selected course should be displayed after all individual details lines have been listed. If no students have registered for the selected course, a meaningful message should be displayed in the output listhox Available Seats Query Button Click Event: This event must use a LINQ to find out how many seats are available for all individual courses in the courses array. If no seats are available, that course should not be include in the output. There is no input required for this event. The only data validation needed here is to insure that the array does contain records (Array DataOK function) The query output should include ONE individual record (single field output) for each element in the array in CSV format. The record should include the following fields: Faculty Member (Reformatted to include only the first initial and last name) - ReformatName function. - Course Id . Section Seats Available (Determined by calling function AvailableSeats which subtracts Current Enrollment from Capacity) The output for the event should take place in an subprocedure, so the query results will need to be converted to an array so it can be passed. Use ToArray to make this happen and then pass the newly created array to the output subprocedure. The output sub (Display AvailableSeats) should include a meaningful header and the individual records that were created in the query and converted into an Array. (DO NOT FORMAT the records - Display them as they were stored in CSV format.) Programmer's Choice Query Button Click Event: The final query event is to be created by you, the programmer. This event does need to use a LINQ and work with the fields that are currently available within the courses array (no creating additional data fields outside of the query itself). The event must meet the following requirements: Create a New Function that will be called from the query and incorporated into the query results. The event must call and use at least one subprocedure. It should create as many subs and functions as logically needed to complete the tasks. Generate well formatted output Optionally: Can call and use previously written functions/subprocedures if the programmer finds a way to incorporate these into their event. Clear Button Click Event: When this button is clicked, the contents of all textboxes should be clear along with the content of the output listbox. Any selection made in the faculty listbox should be 'deselected". Exit Button Click Event: When the user clicks on this button, the program should ask them to verify that they do indeed want to exit before closing the program Soc Courses Coments Cure PO Section Add Record Capacity honda Lucas Jeff Holifield Querer Delete Record fret Court for Courne Query Asalable Seats Query Programmer's Choice Query Mondade Cawform Provedby M S Sample Form Layout The program should be written using the concepts that are covered in the textbook in chapters 1-7.2 (the material that we are working on.) A. Steps required for planning and completing Programming Assignment: 1. Analyze! Make sure you understand the problem and ask questions if you don't. Write pseudocode first for your own use (not to turn in). This is very helpful when planning your functions/sub. Make A PLAN! 2. Design Desk check your pseudocode before coding it to make sure it works correctly. Remember to code- little-and-test-a-lot! Get one module working then move to the next one. 3. Design the interface! a. Create the controls on the form. b. Set the properties for a nice interface. e. Give each control as well as the form meaningful names using proper prefixes d. Tab order should be set from top to down for fields that need to have focus. e. Make sure the form 'looks good": all controls are lined up. f. The text properties should have appropriate values when needed. Add an additional label that says "Programmed by:" and your name 4. Code: a. Following your pseudocode, translate into VB code. b. Use camelCasing and meaningful names for all variables. c. Select appropriate data types as needed. d. Use appropriate scopes for all variables. The only acceptable CLASS level variable for this program is the class-level array. All other variables should be local or block and passed when needed. e. Only pass needed variables to functions/subs. f. Use ByVal and By Ref appropriately. By Ref should only be used necessary. Use standard and meaningful names for all functions and subs. h. Before you submit your program, you must remove any empty stubs and unused variables. Make the spacing consistent, Blank lines can be used within the code to make it more readable, but don't leave gaps in the program where you inserted too many blank lines accidentally 5. Test and Debug: a. Find and correct syntax, execution, and logic errors. b. Test your program with a variety of input to be sure it works properly. 6. Complete the documentation: Internal Documentation: a. The program should include a general comment section just after the Public Class statement. Include: Programmed by: Your full name, CIS 115 and the class time, a general statement indicating the purpose of the program. b. Comments (again) - Each event procedure should begin with a comment just after the header that states the purpose of that event. c. Other comments may be included if you feel they are needed. B. Other requirements 1. Once you have completed the program, you need to Zip the project before it can be turned in. Name the file your LastName_your FirstName>_285_Programming Project One 2. The Zipped file should be placed in the Programming Project One in USA Online by 11:55 pm, Monday, Feb 24. No projects will be accepted late without a valid, documented excuse. ISC/TE 285 Chapter 5 & 7 Programming Project Due Date: February 24, 2020 by 11:55 pm This program will be used to track the seats available for the current semester's SoC courses. The data for each class is to be entered into a text file named "Courses.txt" which should be stored in the project's Bin/Debug folder. Your file should consist of at least 12 records that contain a variety in the data values. Fields that make up each record in the "Courses.txt" file will be: Course Id - Section Id Instructor (First Last) Capacity Current Enrollment Examples of Records stored in "Courses.txt" are shown below: CISI 15.101.Paul Overstreet.25.25 CIS115,102.Paul Overstreet.25.20 CIS115,501,Ocllo Robinson.25.18 ISC285.101. Melissa Smith,30,28 ISC285,501, Melissa Smith.30.25 CIS300.801. Melissa Smith,30,30 CIS300,802 Melis Smith 30.10 CIS324,101,Ocllo Robinson,25,22 This project will have one Class level array variable: "courses". All other variables must be local to the module(s) where they are used and "Passed from one module to another via arguments and parameters where needed. Populating the courses array: You may populate the array from the text file when it is created or at Load time. Display Array Button Click Event: This button click event should clear the output listbox and display a meaningful header along with all elements from the courses array exactly as they are stored. Note: This event was included primarily to help your instructor at grading time so don't format the output: just display each element as it appears in the array. Add Record Button Click Event: Before the body of this event is executed, the following data validations should be performed. The Boolean function AddDataOK should be use when coding this validation o Insure that the Course id textbox isn't empty. Insure that the Section textbox isn't empty. Insure that the Capacity textbox contains a numeric value. o Insure that the Current Enrollment textbox contains a numeric value. o insure that an Instructor's name has been selected from the faculty listbox. Read the values for all five fields into variables from the textboxes and/or listbox in a GetAddInput Sub. Use a Create Record function, to create a csv record from the input which will be added to the end of the array. Use a Write Record subprocedure to insert a new element at the bottom of the courses array and write the newly created record into that position of the array. Call and execute the Display AddOutput subprocedure to provide the user with the following information (always clear your output listbox prior to displaying new, unrelated information and format your output for readability: o Header line O Blank line o Detail line showing the record that was added to the array, Delete Record Button Click Event: Before the body of this event is executed, the following data validations should be performed. The Boolean function DeleteDataOK should be use when coding this validation o Insure that the course id textbox isn't empty. Insure that the section textbox isn't empty. Using a GetDeleteInput Sub, read in the two required values. Knowing that the Course Id and section fields combined will create a unique record identifier, within Function Record Subscript search the array to locate the record that needs to be deleted. Return the subscript value for the array element that holds the record to be deleted or if the requested record isn't found. If the record is found, execute subprocedure DeleteRecord to remove the record from the array and update the array to remove the last record from the array. Execute subprocedure Display DeleteOutput which should use a similar output format as used in Display AddOutput. This output should show the Course ld and Section of the record that was deleted. If the requested record wasn't found, a message should be displayed in the listbox to let the user know. Enrollment Count for Course Ouery Button Click Event: This event must use a LINQ to answer the question, 'how many students are currently enrolled in all sections of the selected course id'. There may be multiple sections of the same course being taught. This query is to work with all records with the given Course Id and the output is to be put in descending enrollment order. Before executing the event, validate that the Course Id textbox isn't Wank and that the array contains records (CourseDataOK function). Subprocedure GetCourse should be used to read in the requested Course Id from the textbox. The query can be created within the button click event itself and the query output should include two separate fields (multiple field output) Faculty Member (Reformatted to include only the first initial underscore, last name) - ReformatName function (Example of output P_Overstreet) - Current Enrollment The output should include a meaningful header and display the reformatted name and current enrollment fields for cach record in the query result. Since we are working directly with the query result in this event, the output will be handled in the event procedure itself rather than in a subprocedure. A total of how many students are currently registered for all sections of the selected course should be displayed after all individual details lines have been listed. If no students have registered for the selected course, a meaningful message should be displayed in the output listhox Available Seats Query Button Click Event: This event must use a LINQ to find out how many seats are available for all individual courses in the courses array. If no seats are available, that course should not be include in the output. There is no input required for this event. The only data validation needed here is to insure that the array does contain records (Array DataOK function) The query output should include ONE individual record (single field output) for each element in the array in CSV format. The record should include the following fields: Faculty Member (Reformatted to include only the first initial and last name) - ReformatName function. - Course Id . Section Seats Available (Determined by calling function AvailableSeats which subtracts Current Enrollment from Capacity) The output for the event should take place in an subprocedure, so the query results will need to be converted to an array so it can be passed. Use ToArray to make this happen and then pass the newly created array to the output subprocedure. The output sub (Display AvailableSeats) should include a meaningful header and the individual records that were created in the query and converted into an Array. (DO NOT FORMAT the records - Display them as they were stored in CSV format.) Programmer's Choice Query Button Click Event: The final query event is to be created by you, the programmer. This event does need to use a LINQ and work with the fields that are currently available within the courses array (no creating additional data fields outside of the query itself). The event must meet the following requirements: Create a New Function that will be called from the query and incorporated into the query results. The event must call and use at least one subprocedure. It should create as many subs and functions as logically needed to complete the tasks. Generate well formatted output Optionally: Can call and use previously written functions/subprocedures if the programmer finds a way to incorporate these into their event. Clear Button Click Event: When this button is clicked, the contents of all textboxes should be clear along with the content of the output listbox. Any selection made in the faculty listbox should be 'deselected". Exit Button Click Event: When the user clicks on this button, the program should ask them to verify that they do indeed want to exit before closing the program Soc Courses Coments Cure PO Section Add Record Capacity honda Lucas Jeff Holifield Querer Delete Record fret Court for Courne Query Asalable Seats Query Programmer's Choice Query Mondade Cawform Provedby M S Sample Form Layout The program should be written using the concepts that are covered in the textbook in chapters 1-7.2 (the material that we are working on.) A. Steps required for planning and completing Programming Assignment: 1. Analyze! Make sure you understand the problem and ask questions if you don't. Write pseudocode first for your own use (not to turn in). This is very helpful when planning your functions/sub. Make A PLAN! 2. Design Desk check your pseudocode before coding it to make sure it works correctly. Remember to code- little-and-test-a-lot! Get one module working then move to the next one. 3. Design the interface! a. Create the controls on the form. b. Set the properties for a nice interface. e. Give each control as well as the form meaningful names using proper prefixes d. Tab order should be set from top to down for fields that need to have focus. e. Make sure the form 'looks good": all controls are lined up. f. The text properties should have appropriate values when needed. Add an additional label that says "Programmed by:" and your name 4. Code: a. Following your pseudocode, translate into VB code. b. Use camelCasing and meaningful names for all variables. c. Select appropriate data types as needed. d. Use appropriate scopes for all variables. The only acceptable CLASS level variable for this program is the class-level array. All other variables should be local or block and passed when needed. e. Only pass needed variables to functions/subs. f. Use ByVal and By Ref appropriately. By Ref should only be used necessary. Use standard and meaningful names for all functions and subs. h. Before you submit your program, you must remove any empty stubs and unused variables. Make the spacing consistent, Blank lines can be used within the code to make it more readable, but don't leave gaps in the program where you inserted too many blank lines accidentally 5. Test and Debug: a. Find and correct syntax, execution, and logic errors. b. Test your program with a variety of input to be sure it works properly. 6. Complete the documentation: Internal Documentation: a. The program should include a general comment section just after the Public Class statement. Include: Programmed by: Your full name, CIS 115 and the class time, a general statement indicating the purpose of the program. b. Comments (again) - Each event procedure should begin with a comment just after the header that states the purpose of that event. c. Other comments may be included if you feel they are needed. B. Other requirements 1. Once you have completed the program, you need to Zip the project before it can be turned in. Name the file your LastName_your FirstName>_285_Programming Project One 2. The Zipped file should be placed in the Programming Project One in USA Online by 11:55 pm, Monday, Feb 24. No projects will be accepted late without a valid, documented excuse

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