Java Lab2


    You are to complete the program that I  have begun. I will supply much of the program skeleton.  Begin by making a new project and a new class.  Name the new class Pairs and then remove the clode that appears in the class and replace it with the code I have supplied as pairs.java  It is best if you save this file as type all files and then open it with notepad.

What you will submit is a Word document containing the output pasted from two runs your run of the java project, each of which has different input illustrating that you understand that your program actually works.  I will also ask you to submit your file pairs.java.  Note you are uploading TWO files this time!

The final run should look like this: where the user input is in red
Please enter a number:5
Please enter another number:6
The sum is 11
The difference is -1
The product is 30
The average is 5.5
The absolute value of difference (distance) is 1
The maximum is 6
The minimum is 5

Using doubles
Please enter a number:8.67
Please enter another number:3.89

Using .10f sum =  12.560000
Using .10e sum = 1.256000e+01
Using .10f difference =   4.780000
Using .10e difference = 4.780000e+00
Using .10f product =  33.726300
Using .10e product = 3.372630e+01
Using .10f average =   6.280000
Using .10e average = 6.280000e+00

Using Strings
Please enter a String containing both upper and lowercase:
My cat is named Sadie.
As all caps=>MY CAT IS NAMED SADIE!
As all lowercase=>my cat is named sadie!
First character=>M
Number of characters=>22
Last character=>!