Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Discuss and suggest a good set of test data for a program that gives an employee a $50

Discuss and suggest a good set of test data for a program that gives an employee a $50

Computer Science

Discuss and suggest a good set of test data for a program that gives an employee a $50.00 bonus cheque if the employee has produced more than 1,000 items in a week.

Assume that a library keeps a file with data about its collection, one record for each item the library loans out. Name at least eight(8) fields that might be stored for each record.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

 Number of items produced by employee in a week could be less than, equal to, or more than 1000. We need to give bonus only when it is more than 1000. We can express this in our program as --

if (itemsproduced > 1000)
bonus = 50;
else
bonus = 0;

So, we need to partition our input (number of items produced) into two sets : "> 1000" and "<= 1000". One value from each set would be sufficient to check the working of above logic - for example 1000 and 1001.

[b] As far as keeping track of loaned items is concerned, minimal information identifying the loaned item, loan duration, to whom it has been loaned - is sufficient.

If our focus is records of items that can be loaned - we need to keep all the relevant item information that can be queried. In case we consider that library allows queries on - to whom item has been issued, when it will be back, then aforementioned loaned items information will also be useful from these records point of view. One possible record could contain fields like -

1. Type of item : book, journal, CD/DVD etc.
2. Title/Name of item
3. Author(s)/Editor(s) of item
4. Publisher of item
5. Edition / Version information
6. Identification code of item (as per library coding scheme)
7. Identity (rollo no of student, employee number of staff, id of institute etc.) of loan taker.
8. Name of person/institute getting the item is loaned out/issued.
9. Date when it is issued
10. Date when item is expected back in library.