Li, Zhilin (1998) Replace a NULL pointer by a null object using object-oriented method. [Graduate Projects (Non-thesis)] (Unpublished)
Preview |
Text (application/pdf)
6MBMQ39989.pdf |
Abstract
Pointers are one of the most powerful and flexible features in C/C++, but they are also one of the most dangerous ones to use. Safe proramming practice requires a pointer to be initialized to NULL once declared. However a NULL pointer does not solve the problem completely. Accessing a NULL pointer may crash the application without offering any useful clues to the real problem. In Object-Oriented design, we can view a NULL pointer as a special kind of object with special behaviors and implement a null object to replace the NULL pointer. Accessing a null object will not crash the application, instead it can perform meaningful operations or display more helpful error messages. In this project, we implement a binary search tree, an AVL tree, a singly linked list using both the traditional NULL pointer method and the Object-Oriented null object method. We then compared the two methods in terms of safety, coding complexity, and time/space efficiency. The implementation language is C++
| Divisions: | Concordia University > Gina Cody School of Engineering and Computer Science > Computer Science and Software Engineering |
|---|---|
| Item Type: | Graduate Projects (Non-thesis) |
| Authors: | Li, Zhilin |
| Pagination: | xii, 218 leaves ; 29 cm. |
| Institution: | Concordia University |
| Degree Name: | M. Comp. Sc. |
| Program: | Computer Science |
| Department (as was): | Department of Computer Science |
| Date: | 1998 |
| Thesis Supervisor(s): | Grogono, Peter |
| Identification Number: | QA 76 M26+ 1998 no.3 |
| ID Code: | 508 |
| Deposited By: | lib-batchimporter |
| Deposited On: | 27 Aug 2009 17:12 |
| Last Modified: | 20 Oct 2022 20:44 |
| Related URLs: |
Repository Staff Only: item control page


Download Statistics
Download Statistics