CS 630 - Computing Fundementals I - Summer 2004
Problem 1 - More Practice with Classes


Loyola College > Department of Computer Science > CS 630 > Homework > Homework 6 > Problem 1

Objectives

Introduction

Recall that the LibraryBook class from a previous example had fields for title, author, borrower, and due date. This class has been updated to include two more fields: call number (a string), and replacement cost (a double). The constructors have been updated to work with these new fields. We will also add several methods that use these fields and the original fields.

Assignment

Add the following methods to the LibraryBook class.

Finish the test driver started in BookTest.cpp. Your test driver should test all the cases of the methods described above. For example, to test isReference you would display the result of calling isReference on a reference book and a non-reference book. Part of your grade for this homework will depend on how completely you test your class.

Files