15-100:
Introductory/Intermediate Programming
(Section F) |
Fall 2006 |
Relevant Reading:
Assignment: (worth 0 exercise points - this exercise is for practice only) THIS EXERCISE IS FOR PRACTICE ONLY. SEE SCOTT OR A COURSE ASSISTANT IF YOU HAVE PROBLEMS OR QUESTIONS. 1) HINT: Look at the compareTo method in the String class. a) Write a program that:
Smith, Jane Doe, John b: Write a second program that lets the user type in names such as Jane Smith and John Doe, but your program still determines alphabetical ordering by LAST name. 2) Write a program which allows the user to enter a list of course percentages (0 - 100). Your program should handle as many scores as the user wishes to enter. After all grades have been entered, display all of the grades which were each of the letter grades. For instance: Sample Input: 100 90 80 81 78 73 95 55 Sample Output: A 100 90 95 B 80 81 C 78 73 D F 55 3) Ask the user to type in the name of 10 movies. Afterwards, the program should display the movies, with every second movie all capitalized. EG: Meet the Fockers THE PHANTOM OF THE OPERA The Wizard of Oz SINGING IN THE RAIN Shrek SAHARA Fever Pitch THE PACIFIER Spanglish FINDING NEVERLAND 4) Write a program that creates 25 robots placed in random positions on the screen. a) Ask the user how many times each robot should move. Then, have each robot move that many times. b) Before each robot moves, have it turnLeft a random number of times. (Eg. robot 0 turns 2 twice then moves, robot 1 turns 5 times then moves, etc.) 5) Write a program that asks the user to enter 30 numbers. The program then reports how many of them were odd, and how many were even. THEN, the program lists WHICH numbers were odd. 6) Using the NewsTeam class we have looked at in class..... a) Write a program that asks the user for the name and experience of each of 15 people. The program should then hire all of these people and assign them roles on the news. When done, the program should display all of the team members. b) Have the newsteam members shuffle offices such that they are in order of the number of years of experience that they have. c) Have the newsteam members shuffle offices such that they are in alphabetical order. d) Move all of the "Weather" people to the front of the array, and everyone else back. e) Have the program change all "Weather" people to "Meterology". 7) Get the ex-filters.zip file. In this project, you will find a StringList class and a StringListTester class. Your job is to finish the StringList class so that the StringListTester class works. (IE. don't modify the StringListTester class.) In particular, you need to fill in three methods. If you have
any questions
about how any of these functions should work, ask. You should not
need to modify anything but the contents of those three methods.
For a working program, your output for words1.txt would look something
like this:
For the rest of the sample files, you will have to decide for yourself what the correct output should be.
Handin:
|