I'm a little confused with an assignment here and i just needed someone to point me in the right direction.

Design an inventory class that stores the following members:

serialNum : An integer that holds a part’s serial number.
manufactDate : A member that holds the date the part was manufactured in dd/mm/yyyy format.
lotNum : An integer that holds the part’s lot number.

The class should have appropriate member functions for storing data into and retrieving data from these members.
Next, design a queue class that can hold objects of the class described above. The program should have a loop that asks the user if he or she wishes to add a part to inventory, or take a part from inventory. The loop should repeat until the user is finished. If the user wishes to take a part from inventory, the program should ask the lotNum of the part and delete the part from the queue. When the user finishes the program, it should display the contents of the member values of all the objects that remain in the queue.

3 Years
Discussion Span
Last Post by joshua.klaser

In your notes you should have stuff you can refer to regarding a basic queue setup, and using/creating classes and class members.

Read through that then post back with your attempt. Then we can move along from there.


I'm afraid we'll need more information than just the assignment statement. Is there anything in particular that confuses you?

  • Do you know how to use multiple source and header files?
  • Do you know what a pointer is, and how to use one?
  • Do you know how to define a class, and where you would define it?
  • Do you know what a member (or instance) variable is, and how to declare one?
  • Do you know what a member function (also called an instance method) is, and how to define and implement one? Do you know where you should implement them?
  • Do you know what accessors and mutators (i.e., getters and setters) are, and how to implement them?
  • Do you know what a queue is, and how to define and implement a class that acts as one?

Edited by Schol-R-LEA

Votes + Comments
solid advice

What folks here are saying is "don't ask us to do your homework for you"... Make an attempt first, and we can help you clean it up. This does not qualify.


That seems like an easy assignment.

Look up classes, vectors and templates and you can figure the rest yourself.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.