What are the errors in the following codes what would


1. What are the errors in the following codes: What would correct the errors?

A.) if ( age >= 65 ) ;
System.out.println( "Age greater than or equal to 65" );

else

System.out.println( "Age is less than 65 )";

B.) int x = 1, total;
while ( x <= 10 )
{

Total += x;
++x;

}

C.) while ( x <= 100 )
total += x;

++x;

D.) while ( y > 0 )
{

System.out.println( y );
++y;

_________________________________________________________________________

2. Drivers are concerned with the mileage their automobiles get. One of my drivers has kept track of several tankfuls of the gas he used and recorded the miles driven and gallons used for each tankful. I need help developing a JAVA application that will input the miles driven and gallons used(both as integers) for each thankful. The program should calculate and display the miles per gallon obtained for each thankful and print the combined miles per gallon obtained for all tankfuls up to this point. All averaging calculations should produce floating-point results. Use class Scanner and sentinel-controlled repetition to obtain the data from the user.
__________________________________________________________________________

3.) A large company pays its salespeople on a commission basis. The salespeople receive $200 per week plus %9 of their gross sales for that week. An example of this would be "a salesperson who sells $5000 worth of merchandise in a week receives $200 plus %9 of $5000 or a total of $650. I have been supplied with a list of the items sold by each salesperson. The value of these items are listed below:

Item Value
1 239.99
2 129.75
3 99.95
4 350.89

I need help developing a Java application that inputs one salesperson's items sold for last week and calculates and displays that salesperson's earnings. There is no limit to the number of items that can be sold by a salesperson.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: What are the errors in the following codes what would
Reference No:- TGS01250291

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)