Given the Customer class and driver described in the previous exercise, add code that removes from the
Question:
Given the Customer class and driver described in the previous exercise, add code that removes from the customers list the discouraged customer who has been standing immediately behind (after) the friend customer and then generates the following output:
<discouraged customer’s name> goes home
Exercise 10.8
Assume a Customer class has a constructor with a name parameter that initializes a name instance variable, and assume this class includes a getName method. A driver for this class includes this code:
Add code that inserts into the customers list a new customer named “Peter”. Make the insertion immediately before the friend object.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean
Question Posted: