Answer to Question #274276 in Java | JSP | JSF for Tej

Question #274276

required to store and analyze data about 6 car manufacturer's sales data in all the 12 months of a year. Demonstrate how you would store the data in a two dimensional matrix and do the following






1. Write a function to Find for a given car manufacturer, the month in which, maximum no. of cars are sold.






2 Write a function to Find the average number of cars sold for each car manufacturer 3. Write a function to Find the total number of cars sold for each car manufacturer 4. Write a function to find standard deviation for a given car manufacturer

1
Expert's answer
2021-12-02T00:35:26-0500


package twodimensionalarray;




public class TwoDimensionalArray {
    private int arr[][];
    int maximum(){
        int max = arr[0][0];
        for(int i=0; i<6; i++){
            for(int j=0; j<12; i++){
                if(arr[i][j]>max){
                    max = arr[i][j];
                }
            }
        }
        return max;
    }
    
    void average_number(){
         
        for(int i=0; i<6; i++){
            int [] average = new int[6];
            int sum = 0;
            for(int j=0; j<12; i++){
                sum += arr[i][j];
            }
            System.out.println(sum /6);
        }
    }
    public static void main(String[] args) {
       
    }
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS