Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CMPT 225 – Fall 2022

Lab 11 - Quiz 4 Practice

•   In your sfuhome/cmpt-225 folder, create a folder called  L11Q4P.

•   Using the same link you just used to access Lab11Quiz4Practice.pdf but replacing the extension pdf with the extension zip, download Lab11Quiz4Practice.zip into your L11Q4P folder and extract the files contained in Lab11Quiz4Practice.zip into your L11Q4P folder.

•   This zip file contains the following:

o   makefile – to compile your code (command: $ make). Make sure this file does not have a .txt extension - not to be modified – not to be submitted

o   UnableToInsertException class (UnableToInsertException.h,          UnableToInsertException.cpp) - not to be modified – not to be submitted

o   BST class (BST.h, BST.cpp)

o   BST.h - the BST header file – may be modified

o   BST.cpp -  the BST implementation (or code) file – must be modified

o   For Quiz 4, the above two files will need to be submitted on CourSys but in this Lab 11 – Quiz 4 Practice, you do not need to submit them but you need to compile and test them!

•   Open and read the content of all these files.

•   The content of BST.h and BST.cpptells you how the BST class is designed and (partially) implemented. Indeed, you will notice that  BST.cpp is incomplete.

o Some of its methods have already been implemented and must not be modified. You can use them by calling them.

o Your task is to implement the BST’s methods that have not yet been implemented such that their  implementation satisfies the  meaning  of their  name  and their documentation contract: description, precondition (if any), postcondition (if any), etc…

o You cannot change the prototype of these methods.

o Note that not everything has been explicitly stated in the documentation contract of these methods you are asked to implement. You need to use your own judgment and your software development experience acquired so far to make the proper decisions.

o Make sure your methods do not print anything, unless their description says so.

•   Notice that a test driver has not been provided as part of this Lab 11 - Quiz 4 Practice. This will also be the case in our Quiz 4. In this lab, you will need to create your own test driver and you will be able to use it during Quiz 4 next week.

•   The methods provided in this Lab 11 - Quiz 4 Practice do not contain any bugs or syntax errors.

•   Incremental Development

o Incrementally implement your methods, i.e., implement one method at a time (or one pair of methods at a time) then compile and test it using your test driver. Once your method (or pair of methods) executes successfully, move on to the next method (or pair of methods).

Good luck!