1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marina CMI [18]
3 years ago
5

Write a program that will input letter grades (A, B, C, D, F), the number of which is input by the user (a maximum of 50 grades)

. The grades will be read into an array. A function will be called five times (once for each letter grade) and will return the total number of grades in that category. The input to the function will include the array, number of elements in the array and the letter category (A, B, C, D or F). The pro- gram will print the number of grades that are A, B, etc.
Computers and Technology
1 answer:
Law Incorporation [45]3 years ago
3 0

Answer:

In Java:

import java.util.*;

public class Main{

public static int countgrades(char[]letterGrades,char Grade, int lent){

    int count = 0;

    for(int i =0;i<lent;i++){

        if(letterGrades[i]==Grade){

            count++;         }     }

    return count;

}

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int lent;

 System.out.print("Length: ");

 lent = input.nextInt();

 while(lent >30 || lent<1){

     System.out.print("Invalid input\nLength: ");

     lent = input.nextInt();  }

 char[] letterGrades = new char[lent];

 for(int i  =0; i<lent;i++){

     letterGrades[i] = input.next().charAt(0);

 }

 char[] letters = {'A','B','C','D','F'};

 for(char i:letters){

     System.out.println(i+": "+countgrades(letterGrades,i, lent));

 }

}

}

Explanation:

See attachment where I I used comment to explain each lin e

Download txt
You might be interested in
What was the #1 song in 1987 and who was the artist
Veronika [31]
Billboard magazine said it was "Walk Like an Egyptian" by The Bangles.
8 0
3 years ago
Read 2 more answers
What would be the result after the following code is executed? final int SIZE = 25; int[] array1 = new int[SIZE]; // Code that w
Maurinko [17]

Answer:

The "Value" variable contains the lowest value of array1 list.

Explanation:

  • When the user passes the value on the array, then the above code is used to find the minimum value from the list of value which is passed by the user.
  • The above array has the 25 sizes, so it will take only 25 value from the user, Then the loop will assume the first value as the minimum value and assign that value on the variable "value".
  • Then all the other elements accessed by the for loop and compare with the value of Value variable if the array value is minimum, then that value is assigned on the variable value.
  • Hence the minimum value of the list will be assigned on the variable value.
8 0
3 years ago
A file type is the standard used to and information in a computer. All file types have unique that determine which program to us
Oxana [17]

The term record types portrays the assortment of relationship among archives and the applications that utilization them. The most clear utilization of this component is that, for instance, Windows knows to run Notepad when you double tap on a book report in Explorer (confirmation that Windows XP isn't genuinely question arranged).

Genuine object-situated configuration manages that articles (for this situation, records and envelopes) know about their very own attributes. This plan is just copied in Windows XP. Rather than each record knowing which application is utilized to alter it, Windows decides how to deal with a document dependent on the filename expansion. This structure has points of interest and weaknesses, however Microsoft's choice to shroud filename augmentations, the reason for record affiliations, just makes the entire framework increasingly hard to comprehend and ace.

Everything begins with document augmentations, the letters (normally three) that pursue the period in many filenames. For instance, the augmentation of the record Readme.txt is .txt, connoting a plain-content document; the expansion of Resume.wpd is .wpd, implying an archive made in WordPerfect. Naturally, Windows shrouds the expansions of enlisted record types in Explorer and on the work area, however it's ideal to have them shown.

Record expansions not just enable you to effectively figure out what sort of document a specific document is (on the grounds that symbols are never unmistakable enough), yet additionally enable you to change Windows' view of the kind of a record by essentially renaming the augmentation. Note that changing a document's augmentation doesn't really change the substance or the organization of the record, just how Windows associates with it.

To show your document augmentations, open Folder Options in Control Panel (or from Explorer's Tools menu), pick the View tab, and mood killer the Hide expansions for realized record types alternative. Snap OK when you're set.

By concealing record expansions, Microsoft wanted to make Windows simpler to utilize—an arrangement that exploded backward for a few reasons. Since just the expansions of enrolled documents are covered up, the augmentations of records that aren't yet in the File Types database are still appeared. Even all the more confounding that, when an application at long last claims a specific document type, it can appear to the unpracticed client just as the entirety of the old records of that type have been renamed. It likewise makes an "information hole" between the individuals who comprehend document types and the individuals who don't; take a stab at telling somebody whose PC still has concealed augmentations to discover Readme.txt in a catalog loaded with records. Different issues have emerged, for example, attempting to separate Excel.exe and Excel.xls in Explorer when the expansions are covered up; one record is an application and the other is a report, however they might be generally undefined.

Redo Context Menus

A setting menu (once in a while called an alternate route menu ) is the little menu that shows up when you utilize the correct mouse catch to tap on a record, envelope, application titlebar, or almost some other item on the screen. More often than not, this menu incorporates a rundown of activities proper to the item you've clicked. As it were, the alternatives accessible rely upon the specific circumstance.

The setting menu for documents, the most ordinarily utilized and altered setting menu, relies on the sort of record chosen, which is dictated by the filename augmentation. For instance, all content documents (with the .txt augmentation) will have a similar setting menu, paying little respect to what they contain or which application was utilized to make them. (This is the reason Windows gives you a harsh admonition when you attempt to change a document's expansion.)

4 0
4 years ago
To<br> a<br> Question I<br> Explain why microsoft Excel is referred<br> preashent package -
ikadub [295]

Microsoft Excel is a spreadsheet program included in the Microsoft Office suite of applications. ... Spreadsheets present tables of values arranged in rows and columns that can be manipulated mathematically using both basic and complex arithmetic operations and functions.

.

6 0
3 years ago
write a function issorted() that accepts an array of real numbers arr and an integer n as arguments, where n is the size of arr.
lesantik [10]

Answer:

Here is code in java.

import java.util.*;

class Main

{

//main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

       int m;

        // scanner object to read input from user

       Scanner ss=new Scanner(System.in);

       System.out.println(" size  of the array:");

       //read the size of the array

        m=ss.nextInt();

        // create array of the given size

        float arr[]=new float[m];

        /* call function to check whether input are in the ascending sorted order or not */

        Boolean res= issorted(arr,m);

       

      // print the result

       System.out.println("array in the ascending sorted order  : "+res);

     

       

   }catch(Exception ex){

       return;}

}

 // function to check whether input are in the ascending sorted order or not

public static boolean issorted(float[] arr,int n)

{

    int i,j;

    float d;

    Boolean flag=true;

    Scanner ss=new Scanner(System.in);

    System.out.println("enter the elements of the array:");

     // read elements of the array

    for(i=0;i<n;i++)

    {

        arr[i]=ss.nextFloat();

    }

   

    // check elements re in the ascending order or not

    for(j=0;j<n-1;j++)

    {

        if(arr[j]>arr[j+1])

        {

            flag=false;

            break;

        }

    }

     // return the result

    return flag;

}

}

Explanation:

With the help of scanner class object, read the size "m" of array.Create an array of  the given size. Pass array and integer into the function issorted(). Read the elements of the array and then check elements are in the ascending order or not.It will return "true" if elements are in the sorted order else it will return "false".

Output:

enter  size  of the array:                                                                                                                                    

5                                                                                                                                                              

enter the elements of the array:                                                                                                                              

1 2 3 4 7                                                                                                                                                      

array in the ascending sorted order  : true                                                                                                                              

enter  size  of the array:                                                  

5                                                                            

enter the elements of the array:                                              

2 4 9 3 5                                                                  

array in the ascending sorted order  : false

7 0
4 years ago
Other questions:
  • "Different links can transmit data at different rates, with the _______ of a link measured in bits/second"
    11·1 answer
  • What authentication protocol is ticket-based and is used by windows computers that are members of an active directory domain?
    13·1 answer
  • What is a program that, when installed on a computer, records every keystroke and mouse click?
    11·1 answer
  • Anyone who uses Edmentum Plato homeschool can anyone please help me my biology is not loading and it says flash is not available
    7·2 answers
  • List the operating system you recommend, and write a sentence explaining why.
    8·1 answer
  • Copy and paste is the only way to move text from one place to another.<br><br>True or <br>False​
    15·2 answers
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
  • 2. what are the advantages of breaking up a single logical message into a number of fixed-sized packets and then sending each on
    5·1 answer
  • Task 2
    13·1 answer
  • What is the main coding language for netflix?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!