LAB 7 - 5 Points
For all programming assignments, your name MUST appear twice in your program:
First, in the comments at the top of your code; and second, in your output. For example, in the output you can say Programmed by Your Full Name. If you do not include your name(s) you will lose 2 points.
At the top of every program this semester you MUST place the following:
// Your Full Name
// Your E-mail Address
// CIS 254AA
// Program Name
// Program Description
// Assignment #
Create a program VowelCount that gets a sentence from the user and outputs the number of each vowel: a, e, i, o, u. Both uppercase and lowercase vowels should be considered the same.
Create a program Substitute that gets a sentence from the user and replaces every occurrence of the word Java (any case) with JAVA.
Create a program Sentence that gets a sentence from the user and then tells the user whether it is a declarative sentence (ending in a "."), interrogative sentence (ending in "?"), or an exclamation (ending in "!").
Create a class PigLatin with a single static method toPigLatin that converts a word to PigLatin and returns it. If the word begins with a vowel you add "way" to the end of the word. If the word begins with a consonant you must move the first letter to the end and add "ay". Write a test program PigLatinTest that gets a sentence from the user and extracts each word and converts it to Pig Latin. You must output the entire sentence translated to Pig Latin. Your program should keep running until the user enters quit.
Be sure to clearly label the output and to comment your code. Use dialog boxes for ALL input and output.
- The source code (.java files) and class files (.class).
- All files (VowelCount.java, VowelCount.class, Substitute.java and Substitute.class, Sentence.java, Sentence.class, PigLatin.java, PigLatin.class, PigLatinTest.java, PigLatinTest.class) must be in an archive file created with the Java jar utility (.jar).
C:\CIS254> jar -cvf G00123456_Lab8.jar *.*