In Section 5.3, we used the example of a Car Dealer object to get across the point that the object with the data should be the one to manipulate the data for you. In this example, we wanted the Car Dealer object to filter the data for us. That is, a Car Dealer object with only a get All Cars () method is less useful to customers than a Car Dealer object with methods that filter the cars according to various criteria specified by the customer, such as get All Cars of Type (Car type) or get all Cars of Color(Color). However, there are many filtering criteria that might be applied besides type and color, such as the year, make, model, mileage. Also, the user might want to use the criteria in various combinations, such as “all those blue minivans manufactured by Ford or Chevrolet in the years 2001–2004 with at most 10,000 miles on them”. How can a Car Dealer object handle all possible combinations and types of filtering without have a separate method to deal with each one?
| GET AN EXPERT FOR YOUR ASSIGNMENT |
Write my Essay. I am looking for someone to write my essay? Welcome, you are at the right place. Our writes will help you out. Provide us with the instructions and one of our writers will deliver a unique, no plagiarism, and professional paper.
Get help with your toughest assignments and get them solved by our team of expert writers. Get your Essay from A Simple Idea to a complete paper. Save time, money and get quality papers.
Get Professional Assistance with Writing Your Papers!
Hire an expert to write my paper for me
Get this essay done before the deadline! Tell us about your assignment and we will find the best writer for your project
Get Help Now!