Thread: Hard programming assignment

  1. #1
    Registered User
    Join Date
    Apr 2006

    Hard programming assignment

    im alittle stuck with the structure i need for this assignment... id really appreciate some pseudo code or even if your willing to write it out for me... thanks

    heres what i need:

    With this assignment you will start to learn how to write a practical menu driven program that manages a list of data. You will use an array of structs to organize the data. You will later learn to save the information in a text file.

    The assignment is to write a menu driven program that manages a collection of items.
    The Menu commands will be:

    A....Add a new Entry
    D....Delete an Entry
    E…Edit an Entry
    P....Display the Inventory (on the screen)
    S....Save Current Inventory to a file.
    C....Clear the entire inventory.
    L…Load sales records from a file

    • You will use structs and an array to organize the data in the program. Your struct will hold the brand name, bottling company, quantity in stock, the current cost of the item, the date of the last shipment and the selling price of the item (6 data fields). Choose data types carefully based on type of information.

    Task Descriptions

    • When you add an entry the program will ask the user for each of these data fields on a separate line.
    • When you delete an entry the program will ask you for the brand name of the item that should be deleted, locate the entry in the array and remove all of the data for that entry. The array should not have unused cells at any other location than the end of the array.
    • When you display the inventory on the screen, all of the information stored for each entry will be labeled and displayed. You will not display entries that have no valid information.
    • Saving the collection to a file copies the current entries in the array to an output file. This must include labeling all of the information so that it is clear what information is being provided.
    • Clearing the collection deletes all of the information in the array
    • Loading sales records will increase and/or decrease the inventory quantities of the specified brands. (See sample input file posted on Blackboard)

    Additional Instructions:
    • Your program should be called finished.c
    • You should use at least 10 functions to appropriately break the problem up into smaller pieces.
    • You should use function prototypes and are not allowed to use global variables.
    • You should use a #define to set the upper bound of the array.
    • Your code should be well designed, well commented and written with good style.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Registered User vinit's Avatar
    Join Date
    Apr 2006
    Announcement: Forum Guidelines. Read before posting
    Announcement: Homework

    Refer to thread created by sherwi = How to create a FILE?newbie question.. its some what similar.

  4. #4
    Registered User
    Join Date
    Jun 2004
    Quote Originally Posted by Seiro
    im alittle stuck with the structure i need for this assignment... id really appreciate some pseudo code or even if your willing to write it out for me...
    I wopuld appreciate you washing my dirty clothes into a sunny sunday. if you need help we are here, but we won't do it for you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with a pretty big C++ assignment
    By wakestudent988 in forum C++ Programming
    Replies: 1
    Last Post: 10-30-2006, 09:46 PM
  2. 3x syntax errors :S, Help a student finalise an assignment
    By Chickenhawk in forum C Programming
    Replies: 14
    Last Post: 07-27-2006, 05:14 AM
  3. which hard drive to buy ? UATA or SATA
    By gemini_shooter in forum Tech Board
    Replies: 10
    Last Post: 08-24-2005, 08:16 PM
  4. Strange hard disk
    By GanglyLamb in forum Tech Board
    Replies: 20
    Last Post: 03-01-2003, 04:05 AM
  5. is C++ really hard to learn
    By Shy_girl_311 in forum C++ Programming
    Replies: 11
    Last Post: 11-11-2001, 12:15 PM