Open main menu

CDOT Wiki β

Changes

Project A2 20141 - OOP344

2,941 bytes added, 20:28, 15 March 2014
Tester: Added binaries.
Please use [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2testing_mar092014.zip this updated tester package] for testing. It includes an updated a2tester.cpp, cdialog.h, cdialog.cpp. There are 4 testing levels. You can change which level you are testing at by changing the '''TEST_NO''' #define at the top of a2test.cpp. It may be any one of 0,1,2,3,4.
The tests do not make it clear when Additionally, here are 5 official example windows binaries. These are compiled versions of assignment 2, compiled with the tester setting set to 0,1,2,3, and 4 respectively.* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test0_mar152014.exe a2_test0_mar152014.exe]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test1_mar152014.exe a2_test1_mar152014.exe]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test2_mar152014.exe a2_test2_mar152014.exe]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test3_mar152014.exe a2_test3_mar152014.exe]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test4_mar152014.exe a2_test4_mar152014.exe] Here are the same binaries compiled on matrix. Download them to your output matrix with the wget command. Usage is "correct" so please refer wget --no-check-certificate address_of_thing_to_download. Note the --no-check-certificate flag. This is because Seneca's HTTPS certificate is out of date and we have to force wget to ignore that fact. Make sure to this page and set the execute bit using chmod.* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test0_mar152014.out https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test0_mar152014.out]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test1_mar152014.out https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test1_mar152014.out]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test2_mar152014.out https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test2_mar152014.out]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test3_mar152014.out https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test3_mar152014.out]* [https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test4_mar152014.out https://scs.senecac.on.ca/~hasan.kamal-al-deen/public_resources/oop344/a2_test4_mar152014.out] Your assignment spec is ready for submission when determining your assignment produces behaviour that is consistent with the above binaries. However, to get 100%, ensure that your output is correctassignment meets all of the criteria in the spec/amended spec.
== Test 0: A1 Test ==
* void** data()
* const void* pdata() const
* void display(int offset)
** Remove CField::display since it has no place as we use '''draw''' to print to screen. If you've written any code in the display function of CField, CLine, CLabel, CButton, then migrate it to the respective draw function. By the end of this fix, CField::display should '''no longer exist'''.
=== Functions to be Added ===
=== Responsibilities ===
CField is responsible for implementing the data setter/getter. As described above, it should have implement the functions:
* void* data() const
* void data(void*)
These functions should do nothing more than get and set an a private void* data member. Child classes should access the data member through the data getter and setter. ==== Child Class Data Storage ====All child classes use some kind of dynamically allocated memory. CLine needs to store a pointer to a dynamically allocated string that it modifies. CLabel and CButton both need to store a pointer to a dynamically allocated string that they display. When implementing these child classes, please use the above data functions to store and retrieve the pointer. '''If you do not, you will crash the a2 tester during some tests!'''
== CLabel ==