[SOLVED] read the file
I need support with this Computer Science question so I can learn better.
Requirement: Your implementation (.cpp) file must be named raq.cpp.
Requirement: The following modifications may be made to raq.h: addition of private class variables to the RAQ and BlockRAQ classes; addition of a copy constructor, destructor, and assignment operator to either class, if necessary; addition of private helper function declarations. No other changes are permitted. In particular, you must not change the declaration of the required public functions (constructor, query, and dump).
Requirement: RAQ must correctly implement the Dynamic Programming solution. Your code will be tested for correct running times, and the TAs will visually inspect your implementation.
Requirement: BlockRAQ must correctly implement the Block Decomposition soution. Your code will be tested for correct running times, and the TAs will visually inspect your implementation.
Reqirement: For BlockRAQ, the blocksize should be ??n?.
This can be computed in C++ with (int) sqrt((float) n).
Requirement: Assignments and copy constructors must function correctly for both classes. You may need to implement a copy constructor, destructor, and assignment operator, depending on your choice of class variable types.
Requirement: For both classes, the query function must throw a domain_error exception if the values of i or j is out-of-bounds or if j is less than i. The allowed values for the indices are 0?i?j?n?1.
Requirement: Your code should not have any memory leaks or memory errors.
Requirement: Follow all codin