You will get email Reply within few hours

Saturday 17 August 2013

Cash of Metals

 Part 1:

1. Write a method called averageVowels that takes an ArrayList of Strings as parameter and returns the average number of vowel characters (a, e,, I, o, u) in all strings in the list.
2. Write a method called minToFront that takes an ArrayList of integers as a parameter and moves the minimum value to the front leaving everything else in its place.
3. Write a program that tests the above methods

Part 2:

You will be making extensions to your Project 1 by creating a new class called Customer and changing
the name of CashforMetals to CashforMetalsClient. Your CashforMetalsClient class will contain the main.
You are encouraged to reuse your work from the project wherever possible.
Customer
1. Write a constructor, which will take one string—the name of the customer. The constructor
should set the customer name and generate the customer identification (ID).
2. Write a get method for the customer name.
3. Write get/set methods for gold and silver weights (4 methods).
4. Write a get method for the customer ID.
CashforMetalsClient
1. Rename your CashforMetals class to CashforMetalsClient. You may have a different name than
this, but it should include “client.”
2. Change this class to reference the customer class for all the customer attributes mentioned under
customer—name, ID, gold weight, and silver weight.
3. You should be creating a new customer object within your loop and calling the constructor
passing the customer name.
4. As you get the weights from the user, you should call the appropriate set method on customer.
5. Similarly, if you need to use a customer value for a calculation, you should be calling the
appropriate get method.
Your output for the Midterm should be the same as Project 1.
Additional Grad Requirements
1. Include a variable in your customer class to keep track of how many customers have been
created.
2. In customer, create a get method for the variable above.
3. Before the client program ends, display the total number of customers created by calling the get
method above.
Need Solution https://gum.co/TLGvS