Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Extend the program below such that the name, and the correspondingsales amount,

ID: 3615667 • Letter: E

Question

Extend the program below such that the name, and the correspondingsales amount, of the salesman who sold the highest sales aredisplayed for each quarter. Name your new
program Lab11_Ex2.java.


import java.util.*;
public class Lab11_Ex1
{   public static void main(String[] args)
     {int i,j;
     double sales[]={0,0,0};
      double num;
      String []name=new String[3];
     Scanner in = new Scanner(System.in);
      for(i=0;i<3;i++)
        { System.out.print("Entersalesman "+(i+1)+"s name: ");
         name[i]=in.nextLine();
          }
       for(i=0;i<3;i++)
          {System.out.println("Enter "+name[i]+"s sales for");
           for(j=0;j<4;j++)
               {System.out.print("Quarter "+(j+1)+":");
              sales[i]+=in.nextDouble();
              }
           }
       System.out.println("TotalSales Summary Salesman Total Sales");
      
       for(i=0;i<3;i++)
           System.out.println(name[i]+" "+sales[i]);
  
      }
   }


Explanation / Answer

please rate - thanks I had to make some changes import java.util.*; public class Lab11_Ex1 {   public static void main(String[] args)      {int i,j,max;      double sales[]={0,0,0};       double[][]quarter=new double[3][4];       double num;       String []name=new String[3];      Scanner in = new Scanner(System.in);       for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote