read the file

Question Description

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.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 0ijn1.0ijn1.

Requirement: Your code should not have any memory leaks or memory errors.

Requirement: Follow all codin

Get your college paper done by experts

Do my question How much will it cost?

Place an order in 3 easy steps. Takes less than 5 mins.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *