Exercises: - SIUE
Exercises:
1. Repeat Exercise 2 in Chapter 7, but use an instance of ArrayList instead of an array. Do not read the number of values, but continue to read values until the user enters a negative value.
|Solution: |
| |
|See the code in CountFamilies.java. |
2. Repeat Exercise 3 in Chapter 7, but use an instance of ArrayList instead of an array. Do not read the number of families, but read data for families until the user enters the word done.
|Solution: |
| |
|See the code in Family.java and CountPoor.java. |
3. Repeat Exercise 5 in Chapter 7, but use an instance of ArrayList instead of an array.
|Solution: |
| |
|See the code in CharacterFrequency.java. |
4. Repeat Exercises 6 and 7 in Chapter 7, but use an instance of ArrayList instead of an array. We will no longer need to know the maximum number of sales, so the methods will change to reflect this.
|Solution: |
| |
|See the code in Ledger.java. |
5. Write a static method removeDuplicates(ArrayList data)
that will remove any duplicates of characters in the object data. Always keep the first copy of a character and remove subsequent ones.
|Solution: |
| |
|public static void removeDuplicates(ArrayList data){ |
|for(int i=0; i ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- writing exercises for 5th graders
- printable english exercises for beginners
- writing exercises for 4th graders
- writing exercises for 7th graders
- writing exercises for 7th grade
- writing exercises for 6th graders
- reading comprehension exercises for adults
- english exercises for beginners pdf
- creative writing exercises for kids
- english grammar exercises free printables
- english grammar exercises free online
- vocabulary exercises for adults