ETSI's Bug Tracker - Ext Pack: Object-oriented features (ES 203 790)
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007957 | Ext Pack: Object-oriented features (ES 203 790) | [All Projects] General | public | 21-05-2020 10:10 | 27-12-2020 13:24

Reporter | KristÃ³f Szabados |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | V1.2.1 (published 2020-05) |
Target Version | V1.3.1 (ongoing) | Fixed in Version |  |

Summary | 0007957: add equals function to the object

Description

When starting to use Object Oriented approaches to write a common library ( like the ones present in C++ and Java) it became apparrent, that the built in object class should have an equals function.
"equals(in object Other)"
Without it becomes necessary to create a common base class (comparable) from which all other classes must be derived from, in order to use common data structures and algorithms.
If this function could be added to the object class, an unnecessary layer of abstraction would be elimintaed.
Also would make it possible (as in C++ and Java) to compare objects based on the internal meaning, rather then their object instances.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |

Attached Files

CR_7957.docx (134,667) 12-08-2020 11:50
http://oldforge.etsi.org/mantis/file_download.php?file_id=3921&type=bug
CR_7957-2.docx (135,905) 12-08-2020 13:55
http://oldforge.etsi.org/mantis/file_download.php?file_id=3924&type=bug
CR_7957-3.docx (152,677) 13-08-2020 09:46
http://oldforge.etsi.org/mantis/file_download.php?file_id=3931&type=bug
CR_7957-4.docx (138,091) 13-08-2020 10:06
http://oldforge.etsi.org/mantis/file_download.php?file_id=3932&type=bug

Issue History
Date Modified | Username | Field | Change
21-05-2020 10:10 | KristÃ³f Szabados | New Issue |
10-08-2020 10:31 | Jens Grabowski | Assigned To | => KristÃ³f Szabados
10-08-2020 10:31 | Jens Grabowski | Status | new => assigned
12-08-2020 11:50 | KristÃ³f Szabados | File Added: CR_7957.docx |
12-08-2020 11:51 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
12-08-2020 13:04 | Jacob Wieland - Spirent | Status | assigned => confirmed
12-08-2020 13:38 | Jacob Wieland - Spirent | File Added: CR_7957-2.docx |
12-08-2020 13:55 | Jacob Wieland - Spirent | File Deleted: CR_7957-2.docx |
12-08-2020 13:55 | Jacob Wieland - Spirent | File Added: CR_7957-2.docx |
12-08-2020 13:56 | Jacob Wieland - Spirent | Note Added: 0015710 |
12-08-2020 13:56 | Jacob Wieland - Spirent | Status | confirmed => new
12-08-2020 13:57 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
12-08-2020 13:57 | Jacob Wieland - Spirent | Status | new => confirmed
13-08-2020 09:35 | Tomas Urban | File Added: CR_7957-3.docx |
13-08-2020 09:42 | Tomas Urban | File Deleted: CR_7957-3.docx |
13-08-2020 09:46 | Tomas Urban | File Added: CR_7957-3.docx |
13-08-2020 09:51 | Tomas Urban | Note Added: 0015721 |
13-08-2020 09:51 | Tomas Urban | Assigned To | Tomas Urban => Jacob Wieland - Spirent
13-08-2020 09:51 | Tomas Urban | Note Edited: 0015721 | bug_revision_view_page.php?bugnote_id=15721#r526
13-08-2020 10:06 | Jacob Wieland - Spirent | File Added: CR_7957-4.docx |
13-08-2020 10:07 | Jacob Wieland - Spirent | Note Added: 0015722 |
13-08-2020 10:07 | Jacob Wieland - Spirent | Status | confirmed => resolved
13-08-2020 10:07 | Jacob Wieland - Spirent | Resolution | open => fixed
13-08-2020 10:07 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
17-12-2020 16:21 | Gyorgy Rethy | Product Version | => V1.2.1 (published 2020-05)
17-12-2020 16:21 | Gyorgy Rethy | Target Version | => V1.3.1 (ongoing)
27-12-2020 13:24 | Jens Grabowski | Status | resolved => closed

Notes

(0015710)
Jacob Wieland - Spirent
12-08-2020 13:56

I have fixed the example so that it actually does what one would expect from a comparison between rectangles and squares, please review

(0015721)
Tomas Urban
13-08-2020 09:51

I optimized it a little bit further:
1. The comparison to this is the first type of check, because it is the fastest one
2. Rectangle has always 4 sides, so there's no need to check the number of sides nor have a function returning it in this example.
3. I replaced the function for returning a length of a rectangle side with functions returning its width and height which are the properties one would usually expect from a rectangle object.
Please check.

(0015722)
Jacob Wieland - Spirent
13-08-2020 10:07

changes ok, deleted erroneous comment