Someone please breifly explain what this assignment is asking for? Im slow

Implement a fixed size container class that encapsulates a statically sized array and test it using a suitable driver program (break the program into 3 files- definition, implementation and driver). Use a typedef statement to create a synonym for the instance variable’s (the array) data type to make your code more flexible (see the PlainBox class in Chapter 3). Test your program with an array of ints and an array of doubles (you should only have to make one change in the typedef statement to do this).

Your class should include the following data members:
• An array (of size 10 by default)
• A variable to hold the array capacity (capacity).
• A variable to keep track of the number of elements currently being used (num_used).

A constructor:
• The default constructor initializes capacity to 10 and num_used to 0.

Include functions to:
• Determine if the array is full (return a bool value)
• Determine if the array is empty (return a bool value)
• Return the array capacity
• Return the number of elements currently being used

Additional member functions:
• A one argument function to return an element at a given position (get)
• A one argument function to overwrite an element at a given position (set)
• A one argument function to add a given element to the array at the next available location. (at the back)
• A function to return the position of an element passed as an argument. Return a -1 if not found.

Note: Make sure you check for out of bounds conditions and the cases when the array is full.

Your driver program should declare an array object; input values from the keyboard; manipulate the array elements by making calls to get, set and add; test the full, empty and array capacity methods; and print the contents of the partially filled array after the initial input and after all the manipulations are performed. The main method should implement a menu system with a quit option so the user can make selections for add, set, get, etc.
What exactly don't you understand?

mainly the first paragraph and how to start the code
The first paragraph is just an overview of the assignment. It says you need to create a class and that this class has an array as one of the member functions. It also says that to complete the assignment that there must be three separate files. A file that holds the class definition (a header file), a file that holds the class implementation, and a file that holds main() which will test your class.

Most of the rest of the text describes the class, telling you what variables are required and what member functions are required.

The last section describes what you are required to do to test your class.

But really if you don't understand the assignment you really should be talking to your instructor.
Topic archived. No new replies allowed.