CISC 1115
Introduction to Programming Using Java
Lab #16
Strings

How to Develop and Submit your Labs

Lab 16.1 — String Processing (StringProcessor)

Write a program that reads in a sequence of strings (using nextLine and a header value) fom the file strings.text, and prints out various properties and manipulations of the individual strings. The program should also sort the strings and print them out in sorted order. (This exercise is similar to Lab 14)

As each string is read in, you should print out:

Once the strings have been read in, they should be sorted and the result printed.

Sample Test Run

For example if the file strings.text contains:

8
The quick brown fix jumped over the lazy brown dog.
Hello world!
CISC 1115 is and introduction to Java
just...
some ...
words
madam im adam
madamimadam
the program should produce the following output:
original string: The quick brown fix jumped over the lazy brown dog.
reversed       : .god nworb yzal eht revo depmuj xif nworb kciuq ehT
vowels removed : Th qck brwn fx jmpd vr th lzy brwn dg.
plural         : The quick brown fix jumped over the lazy brown dog.s
isCapitalized  : true
containsBlanks : true

original string: Hello world!
reversed       : !dlrow olleH
vowels removed : Hll wrld!
plural         : Hello world!s
isCapitalized  : true
containsBlanks : true

original string: CISC 1115 is and introduction to Java
reversed       : avaJ ot noitcudortni dna si 5111 CSIC
vowels removed : CSC 1115 s nd ntrdctn t Jv
plural         : CISC 1115 is and introduction to Javas
isCapitalized  : true
containsBlanks : true

original string: just...
reversed       : ...tsuj
vowels removed : jst...
plural         : just...s
isCapitalized  : false
containsBlanks : false

original string: some ...
reversed       : ... emos
vowels removed : sm ...
plural         : some ...s
isCapitalized  : false
containsBlanks : true

original string: words
reversed       : sdrow
vowels removed : wrds
plural         : wordses
isCapitalized  : false
containsBlanks : false

original string: madam im adam
reversed       : mada mi madam
vowels removed : mdm m dm
plural         : madam im adams
isCapitalized  : false
containsBlanks : true

original string: madamimadam
reversed       : madamimadam
vowels removed : mdmmdm
plural         : madamimadams
isCapitalized  : false
containsBlanks : false


Initial array: {
The quick brown fix jumped over the lazy brown dog.
Hello world!
CISC 1115 is and introduction to Java
just...
some ...
words
madam im adam
madamimadam
}

Sorted      : {
CISC 1115 is and introduction to Java
Hello world!
The quick brown fix jumped over the lazy brown dog.
just...
madam im adam
madamimadam
some ...
words
}

Notes: