This assignment is to be done with your teammate (if you have one). OverviewAn important and common use for computer science ideas is for translating or converting text from one form, or one language, to another. Tools like Babel Fish will convert text from one language to another. Compilers convert computer programs from one programming language to another. For this assignment, you'll create a computer translator that will take text and convert it to pirate-speak. You'll be ready to go for International Talk Like A Pirate Day! SpecificsYour mission is to create a program to convert English to Pirate. Create a directory called pirate for your code, and name your program Pirate.java. Specifically, here are some rules to follow:
Some assistanceA considerable challenge in writing a program like this is to be able to separate the words from the punctuation. Java has built in capabilities for doing so. This SeparateWords.java program will read in text from a file and separate out the words from the punctuation and spaces between them, and print it back out to the screen with a "/" between each so you can see how it separated things. Feel free to take a look and use this if it is helpful, but remember to type in yourself any code that you use (copying and pasting with the mouse tends to make you skip actually learning it, whereas retyping it seems to get it to sink in better.) The source text for your program should be in a file called source.txt. Your program should grab text from that file and print the translation to the screen. In other words, it should work fairly similarly to the above program; but it shouldn't print out the separator between words and punctuation, and it should translate to pirate-speak. Wrap upWhen finished, use hsp to submit your pirate directory. Indicate in program comments the names of both authors (you and your partner), as well as roughly what fraction of the time each team member spent "driving" at the keyboard. You should be working to give all team members approximately the same amount of time driving. Good luck, and have fun! Remember that lab assistants are available in the evenings in CMC 306 to help out if you need it. Many thanks to David Reed at Creighton University for the idea for this assignment! |
|
Moodle Docs for this page