Creating, Testing and Submitting Visual Basic Programs
The programs will be written using the Microsoft Visual Basic Express Edition IDE (Integrated Development Environment), which can be downloaded from the Microsoft Web Site.
Testing programs will be done in the IDE. Open the Project and press F5 to compile and run the program. Appendix A contains information on debugging programs. Please review this information before you start the assignments.
What to submit for grading: Everything in the Solution folder and its subfolders should be sent in a compressed file. In Windows Explorer, right-click on the solution folder and create a compressed file. Send the compressed file as an email attachment, as described above.
Assignment 2
User Requirements
There are four major time zones in the continental United States: Eastern, Central, Mountain, and Pacific. Create a VB program that allows the user to enter the time for any one of the four time zones and the other three time zones will automatically be updated to display the correct time. User should also select A.M or P.M. Your program should work for all four time zones. Use hours:minutes format for times. Do not include seconds.
Program Requirements
• You must center all forms on the screen.
• You must use text boxes for on-screen input and output.
• You must use labels to make the application understandable
• You must use option buttons or checkboxes to indicate a.m. or p.m.
• You must validate the user input and display a message if input is not valid
• You must use at least one user-defined FUNCTION and one user-defined SUB procedure.
• You must have an “About”dialog box with information about yourself.
• Place an Image Control on one of your forms so that when the user enters a specific time zone, a certain picture will appear on the form which corresponds to that time zone. It is fine to use clipart, pictures from the Web, or your own drawings or photos.
• You need to provide a way to exit the program gracefully.
Assignment 3
User Requirements
Create a Visual Basic application that uses the Inventory database from the chapter 11 student data files, which contains a table of the parts in the inventory. The user should be able to do the following:
·
Scroll through the data records, showing all the fields.
· Add a new parts record, delete an existing parts record, and update an existing parts record.
· Create a sequential file with the inventory data.
· Display the number of active and discontinued inventory parts.
Program Requirements
· You must center the form on the screen.
· In addition to the database fields, for each part in the inventory you must calculate and display
o
the gross profit (sales price – cost)
o the total cost value of the part in the inventory (cost * quantity)
o the total sales value of the part (sales price * quantity)
in 3 unbound control instances. These values should be updated when the current record changes.
· Create a button and corresponding click event handler that will display a message box containing the number of discontinued inventory parts, and the number of inventory parts that are not discontinued.
· You must use labels to make the application understandable
.
· You must catch any arithmetic exceptions that occur during calculations and display an error message
· You must use at least one user-defined FUNCTION and one SUB procedure.
· You need to provide a way to exit the program gracefully.
Assignment 4
User Requirements
Create a calculator application.
The user interface should consist of buttons for the digits 0 through 9, a button for each arithmetic operator, a Clear button and two label boxes to display the results. One label box should hold the current number and be located at the top of the form. The other label box should be located to the right of the calculator buttons. As you click each numeric button, the number is appended to the current number that appears in the label at the top of the form. When you click an arithmetic operator button, the current number and the operator should be appended to the display in the label at the right of the form on a new line, followed by the result of the calculation on a new line, and the contents of the current number label box should be cleared.
The application must have a menu system that allows the user to change the font and color of the label boxes, show the “About” dialog box, and gracefully exit the application.
Program Requirements· You must center the form on the screen.
· You must use label boxes for on-screen output.
· You must use labels to make the application understandable· You must catch any arithmetic exceptions that occur during calculations and display an error message
· You must use at least one user-defined FUNCTION and one user-defined SUB procedure.
· You must have an “About”dialog box with information about yourself.
· You must provide a graceful exit on the menu.