Programming

fcnexl76
timer Asked: Apr 23rd, 2016

Question Description

Imagine an operation is specified as follows:

context: Member::compareTo(otherMember : Member)

pre:

– the surname and initials of this member are not null

– the surname and initials of otherMember are not null

post:


compares this member with another member according to the alphabetical

order of their names, ignoring case. The names are compared first by

surname and then if the surnames are the same the initials are compared.

– if the name of this member is alphabetically before the name of the other

member return -1

– if the name of this member is alphabetically after the name of the other

member return + 1

– otherwise return 0

Suppose you are asked to


Suppose you are asked to design black-box tests for this operation. Say what tests

you would choose, and for each test provide the inputs, the expected result, and a

brief rationale for the test. Assume design by contract (DbC).


User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Content

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors