Syntax and Word Play
August 28th, 2012
Some sort of Introduction
Some of you are new to this java thing, others are not. This week's lab will help you get (re)familiarized with some of Java's quirky syntax. This will be one of the easier labs and there is a provided skeleton file if you wish to use that. You are NOT REQUIRED to use the skeleton file, however if you have no idea how to start, a good point to start would be within a skeleton file (after reading the lab requirements of course). Labs may have a "ridonkulus" background story, this is normal and will probably happen with every lab. Mostly puns on things on the real world, and sometimes completely made up things in order to have a sort of back story to why the lab exists other than for just a grade.
Formal Introduction
Hopefully before now you have seen or heard the word String somewhere within the concept of programming. Today we will be playing with some Strings, manipulating them and playing with their inner components, characters. If this is the first time you are working with Strings, a good place to look into would be Java's String API
Requirements
- Perform a "duplicateCharacters" operation. EX: given String Hello must PRINT OUT a String HHeelllloo
- Perform a "reverseString" opration. EX: given String ABCDEF must PRINT OUT a String FEDCBA
- Perform a "stringInvertCase" operation. EX: given String MyLifeIsAverage must PRINT OUT a String mYlIFEiSaVERAGE. For this operation, it would be useful to look at the ASCII VALUE TABLE
- Your program output must look something like this, input given ABCedFG
AABBCCeeddFFGG GFdeCBA abcEDfg