Part 1

Run the Driver in the part1 package. You should see the following output in the Console view:

Calling getQuote() the first time on a Zoe object should produce:

Zoe: We live in a spaceship, dear.

What I got was:

We live in a spaceship, dear.

If needed, edit the code in Zoe.java so that the output matches what is expected when the Driver is run. Remember, you may not make any changes to Driver.java, nor to Lab5.java, to fix this bug. There may be more than one way to solve the problem.

Once you have fixed this problem, edit the constructor of part1.Lab5 so that the checkZoeSecondQuote() method is called rather than the checkZoeFirstQuote() method. If needed, edit the code in Zoe.java so that the output matches what is expected when the Driver is run. BEFORE CONTINUING WITH PART 2, ENSURE THAT BOTH OF THE 'check' METHOD CALLS PRODUCE THE CORRECT VALUE. Uncomment both methods calls in the constructor, run the Driver, and make sure that both produce correct answers.

Part 2

Before you start part 2, make sure you close ALL your currently open editor windows. Otherwise you run the risk of editing a file from part1 rather than a file from part2.

Run part2.Driver. Notice that no output is produced. This is because all of the lines in the part2.Lab5() constructor are commented out. Comment in one method at a time, editing the part2.Zoe and part2.Mal classes to make the output correct.

BEFORE CONTINUING WITH PART 3, ENSURE THAT ALL SIX OF THE 'check' METHOD CALLS PRODUCE THE CORRECT VALUE. Uncomment all six of the method calls, run the Driver, and make sure that all six produce correct answers.

Part 3

Before you start part 3, make sure you close ALL your currently open editor windows. Otherwise you run the risk of editing a file from an earlier part rather than a file from part3. Run part3.Driver. Notice that no output is produced. This is because the body of the part3.Lab5 constructor is empty. In this part there are ten methods that you need to check. Write each of the ten method calls. Comment in one method at a time, editing the part3.Zoe, part3.Mal and part3.Wash classes to make the output correct.

BEFORE CONTINUING WITH PART 4, ENSURE THAT ALL TEN OF THE check METHOD CALLS PRODUCE THE CORRECT VALUE. Uncomment all ten of the method calls, run the Driver, and make sure that all ten produce correct answers.

Part 4

Run part4.Driver. This time output IS produced. There are already method calls written into the constructor. This time things are a little more challenging. You might have noticed that in the earlier pan each of the check methods could be run independently of the others because new Zoe, Mal and Wash objects were created in these methods and the getQuote() method was called as many times as needed to get the relevant value.

In part 4, however, the calls are dependent on one another. You cannot check the correct functioning of check5econdQuote without checkFirstQuote having been called first. Likewise you cannot verify that checkThirdQuote is working correctly without both checkFirstQuote and checkSecondQuote having been called, in that order. Edit the part4. Zoe, part4.Mal and part4.Wash classes to make the output correct.

BEFORE SUBMITTING, ENSURE THAT ALL OUTPUT OF THE check METHOD CALL IN ALL THE PARTS PRODUCE THE CORRECT VALUE.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.