Below are a selection of college exam papers that you are lickly to take if you live in North America the following paper is taken from a years study on a course so if you can do any of this before this time then you have notthing to worry about. If you decide to take the real thing.
The Exam project 3 is loading please wait
Goto Project 4
DATA FILES
Create the following sequential files:
Customer No | LastName | FirstName | Address | City | State | Zip | ||||||||||||||||||||||
12345 | JONES | MARY | 123 MAIN ST | FLAGSTAFF | AZ | 6001 | ||||||||||||||||||||||
98765 | SMITH | WALDORF | 5487 MUPPET | TX | 75221 | 56124 | CHAVEZ | JUANITA | 2578 MARQUIS | HOBBS | NM | 79111 | 22117 REDF. GUY | BOX 1002 | TULSA | OK | 74136 | |
· Current file ORDERS.TXT
Invoice CustomerNo Total
99001 12345 1587.20
· PC.TXT
Description | Price | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Pentium II - 200Mhz | 799 | ||||||||||||
Pentium II - 233Mhz | 875 | ||||||||||||
Pentium II - 266Mhz | 999 | ||||||||||||
Pentium II - 300Mhz | 1223 | ||||||||||||
Pentium II - 400Mhz | 1434 | ||||||||||||
Pentium III - 500Mhz | 1798 | ||||||||||||
Pentium III - 600Mhz | 2176 |
CUSTOMER FORM
Make sure all controls are cleared out in the code when the customer form is activated. Focus should be on the customer number text box. The Lookup and Quit buttons should be enabled. The Order button should be disabled.
Use a control array of text boxes in the Customer Information frame. Also use a dropdown combo box to display the states in sorted order. The user must pick only from the states listed.
Allow the user to enter up to a five-digit numeric customer number. Do not read any files until a five-digit number has been entered. Notify the user of any errors when they press the Lookup button. If the user enters an existing customer number, display the customer information frame with all data for that customer. The frame should be disabled to prevent user entry. The Add Customer button should not be visible. The Order and Quit Buttons should be enabled at this time.
If the user enters a valid number, but the customer does not exist in the file, ask the user in a message box if they would like to add a new customer. If the answer is No, clear all controls and rest focus on the customer number. If the answer is Yes, allow the user to enter name, address, etc. in the customer information frame. Enable the Add Customer button. If anything is left blank, notify the user with a message box and reset focus on that control. Loop through the controls to see if they are blank. Only display one error message at a time. If all customer information is complete and the user presses the Add Customer button, append the new customer to the file. Enable the Order button.
If the user presses the Quit button, terminate the application. If the user presses the order button display the Order Form.
ORDER FORM
Draw frames for the processor, RAM, and options. Use a dropdown combobox for the processesor that does not allow the user to enter any new information to the list. Use control arrays for the option buttons and checkboxes. The back color for the Accept button should be green and the back color of the Reject button should be red.
Load the processor dropdown combobox and clear all controls. Display the customer First and Last Name in the Customer Name label. The new invoice number should be one (1) greater than the highest invoice number in the invoice file. The invoice date is the system date.
By default, the order should first display the slowest processor and 16Mb of RAM. The appropriate prices should appear in the labels to the right. The sales tax rate comes from the sales tax file and is dependent upon the customer's state. The total invoice amount should be displayed for the default system.
NOTE: After the processor combo box is loaded once, do not read the file a second time to get the prices. The values on the invoice should change dependent upon the user's choices. The totals should be recomputed every time something changes using a programmer-defined subroutine procedure or function. The following table should be used to determine the amount charged for memory and options (these can be hard coded for this project):
RAM Options
16Mb 0 Modem 150
32Mb 75 Sound Card 189
64Mb 150 Graphics Card 225
128Mb 300 Color Printer 249
256Mb 700 Monitor 399
CD ROM 199
If the user presses the Reject button, return to the Customer form with all of the controls cleared and focus on the customer number. If the user presses the Accept button, make sure that, at least, the processor and RAM are complete-no options are required. Post the necessary information to the Order File and then return to a clear Customer form with all controls cleared and focus on the customer number.