Write a program to maintain a generic collection of Customer objects in memory. The Customer object should contain the following properties: 1. Name 2. Address 3. TotalPurchases Prompt the user for...


Write a program to maintain ageneric collectionofCustomerobjects in memory. The Customer object should contain the following properties:


1. Name


2. Address


3. TotalPurchases


Prompt the user for these values and populate a Customer object that will then be added to a genericcollection.



Hint: use a List for storing Customer objects.


Once the user has finished adding all the customers, the program should print all customers along with their information (name, address and total purchase) sorted by TotalPurchases in an ascending order.



Based on your understanding, please list out some of the reasons for creating these immutable objects. What are some of the benefits for creating and using immutable objects?

Nov 21, 2019
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here