Please help a failing student

I really need help understand how to complete this project, is there anyone out there that can help a failing student????

In this exercis'e you will open, read, write, close, and print a sequential file.
Scenario: Boggs Inc. wants an application that will allow the user to enter the inventory number, quantity, and price of each item in inventory. The application should allow the user to record this information in a sequential access file named la3.dat in the
Tut06 folder on your Student Disk.
In addition, the application should allow the user to print a report showing the inventory number, quantity, and price of each inventory
item, as well as the average price. (Hint: To calculate the average price, multiply each item's quantity by its price; add these amounts together, then divide that sum by the total quantity of all the items in inventory.)
a. Create an appropriate interface. (Refer to the list of GUI design and programming guidelines at the beginning of Lesson C's Exercises section.)
b. Save the form and the project as la3Done in the Tut06 folder on your Student Disk.
c. Code the application appropriately, then save and run the application.
Test the application by entering and saving the following records:

Inventory Number
ABC12
XYZ35
KLK25
Quantitv Item Price
100
50
150
10.50
15.99
20.00
d. Print the report.
e. Stop the application, then run the application again. Enter and save the following
records, which should be added to the records aheady in the file.
Inventory Number Quantit)' Item Price
WER1O
JAN24
110 5.53
20 4.56

Comments

  • : I really need help understand how to complete this project, is there anyone out there that can help a failing student????
    :
    : In this exercis'e you will open, read, write, close, and print a sequential file.
    : Scenario: Boggs Inc. wants an application that will allow the user to enter the inventory number, quantity, and price of each item in inventory. The application should allow the user to record this information in a sequential access file named la3.dat in the
    : Tut06 folder on your Student Disk.
    : In addition, the application should allow the user to print a report showing the inventory number, quantity, and price of each inventory
    : item, as well as the average price. (Hint: To calculate the average price, multiply each item's quantity by its price; add these amounts together, then divide that sum by the total quantity of all the items in inventory.)
    : a. Create an appropriate interface. (Refer to the list of GUI design and programming guidelines at the beginning of Lesson C's Exercises section.)
    : b. Save the form and the project as la3Done in the Tut06 folder on your Student Disk.
    : c. Code the application appropriately, then save and run the application.
    : Test the application by entering and saving the following records:
    :
    : Inventory Number
    : ABC12
    : XYZ35
    : KLK25
    : Quantitv Item Price
    : 100
    : 50
    : 150
    : 10.50
    : 15.99
    : 20.00
    : d. Print the report.
    : e. Stop the application, then run the application again. Enter and save the following
    : records, which should be added to the records aheady in the file.
    : Inventory Number Quantit)' Item Price
    : WER1O
    : JAN24
    : 110 5.53
    : 20 4.56
    :
    :

    I won't do your homework for you but I will show you how to loop through a seqential file:
    lets say each line in your dat file contains the item description and number( in that order)
    [code]

    dim FileNum as long
    dim strItemDes as string
    dim itemNum as string ' this assumes you are using numbers less then 32,000 <- not exact

    filenum = freefile

    open app.path & "la3.dat" for input as #filenum
    'now this is the important part
    while not eof(filenum) ' will loop through each record in the file (eof == End Of File)
    input #filenum, strItemDes, itemNum
    ...whatever you want to do with each record here
    wend
    close #filenum
    [/code]


    file access is one of the most basic things you will learn, this will give you a good place to start
    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

  • : I really need help understand how to complete this project, is there anyone out there that can help a failing student????
    :
    : In this exercis'e you will open, read, write, close, and print a sequential file.
    : Scenario: Boggs Inc. wants an application that will allow the user to enter the inventory number, quantity, and price of each item in inventory. The application should allow the user to record this information in a sequential access file named la3.dat in the
    : Tut06 folder on your Student Disk.
    : In addition, the application should allow the user to print a report showing the inventory number, quantity, and price of each inventory
    : item, as well as the average price. (Hint: To calculate the average price, multiply each item's quantity by its price; add these amounts together, then divide that sum by the total quantity of all the items in inventory.)
    : a. Create an appropriate interface. (Refer to the list of GUI design and programming guidelines at the beginning of Lesson C's Exercises section.)
    : b. Save the form and the project as la3Done in the Tut06 folder on your Student Disk.
    : c. Code the application appropriately, then save and run the application.
    : Test the application by entering and saving the following records:
    :
    : Inventory Number
    : ABC12
    : XYZ35
    : KLK25
    : Quantitv Item Price
    : 100
    : 50
    : 150
    : 10.50
    : 15.99
    : 20.00
    : d. Print the report.
    : e. Stop the application, then run the application again. Enter and save the following
    : records, which should be added to the records aheady in the file.
    : Inventory Number Quantit)' Item Price
    : WER1O
    : JAN24
    : 110 5.53
    : 20 4.56
    :
    :

    The other thread mentions opening & reading.

    To print the file you will need to use the printer object in vb.
    you print using 'printer.print' and send the document using 'printer.enddoc'.

    A large amount of sequential file handling can be found in a number of vb books such as using vb or programming windows apps using vb - thats where i started.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories