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 #
// Date

  • 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.

    SUBMIT:

    EXAMPLE:
    C:\CIS254> jar -cvf G00123456_Lab8.jar *.*