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
Sidana [21]
3 years ago
5

//TO-DO: Fill in the Authors Name Here//TO-DO: Fill in the current date here//CS1428 Lab//Lab 10//Description: this program will

find letter grades from 5 number grades#include using namespace std;double getAverage(double g[], const int SIZE){ double total = 0; for(int i = 0; i < SIZE; i++) { total += g[i]; } return total / SIZE;}void getGrades(double g[], const int SIZE){ cout << "Please enter 5 grades:" << endl; for(int i = 0; i < SIZE; i++) { cin >> g[i]; }}// TODO: Complete function definitionsint main(){ const int SIZE = 5; double grades[SIZE], average; int numberOfAs = 0, numberOfBs = 0, numberOfCs = 0, numberOfDs = 0, numberOfFs = 0; //TODO: Add function calls return 0;}
Computers and Technology
1 answer:
slamgirl [31]3 years ago
7 0

Answer:

countLetterGrades:

void countLetterGrades(double grades[], const int SIZE, int &numberOfAs,int &numberOfBs,int &numberOfCs,int &numberOfDs,int &numberOfFs) {

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

if(grades[i]>85){numberOfAs++;}

else if(grades[i]>75){numberOfBs++;}

else if(grades[i]>65){numberOfCs++;}

else if(grades[i]>55){numberOfDs++;}

else{ numberOfFs++;}

}

}

printData:

void printData(double average, int numberOfAs,int numberOfBs,int numberOfCs,int numberOfDs,int numberOfFs)

{

cout<<"Average: "<<average<<endl;

cout<<"Number of A's: "<<numberOfAs<<endl;

cout<<"Number of B's: "<<numberOfBs<<endl;

cout<<"Number of C's: "<<numberOfCs<<endl;

cout<<"Number of D's: "<<numberOfDs<<endl;

cout<<"Number of F's: "<<numberOfFs<<endl;  

}

Explanation:

<em>Your question is poorly formatted. (See attachment for proper presentation of question)</em>

------------------------------------------------------------------------------------------------------------

The first step is to go to the main function and replace

//TODO: Add function calls

with the following 4 lines of code:

<em>getGrades(grades,SIZE); </em>

<em>average = getAverage(grades,SIZE); </em>

<em>countLetterGrades(grades, SIZE, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs); </em>

<em>printData(average, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs); </em>

------------------------------------------------------------------------------------------------------------

1. getGrades(grades,SIZE);

This calls the getGrade functions; The getGrade function is where the user inputs 5 grades for a student

2. average = getAverage(grades,SIZE);

Next, is to get the average of the input grades. This is done using the above and the average is stored in variable average

3. countLetterGrades(grades, SIZE, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

Next, is to get letter grade of each number grade. This is done using countLetterGrades function.

4. printData(average, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

The above 3 functions populate data for average, numberofAs to numberofFs; This values are passed to printData function to to display program output.

------------------------------------------------------------------------------------------------------------

Next complete countLetterGrades and printData functions as seen in the answer section.

<em>For clarity, see the attached cpp file for line by line explanation of the complete code </em>

You might be interested in
On laptops, wireless cards tend to be attached to which panel?
ELEN [110]

Answer:

LCD panel

Explanation:

Regularly these wireless cards tend to be attached to the LCD panel because the wireless cards have a Wi-Fi antenna to get a better signal.

Regularly the wireless card has two cables, those cables go between the hinges until arrives at the display panel (LCD panel).

There are wireless cards that are connected by the USB port, this is so useful because there are some cards welded in the motherboard.

8 0
4 years ago
The relational algebra expressions can be rearranged and achieve the same result but with a better processing time. A selection
BigorU [14]

Answer:

c. This would reduce the number of tuples to involve in the join resulting in a more efficient query.

Explanation:

SQL or structured query language is a database querying language used to communicate or interact with databases. A database query could be as simple as returning all the columns from a database table to complex like joining several query results which in turn forms an algebra expression.

Every query statement or expression is executed with time, execution time needs to be minimized for efficiency, so, a well-arranged and reduced joining in the query improves the efficiency of the query.

8 0
3 years ago
Explain the concept of “survival of the fittest”
klasskru [66]

Answer:

i think thats a line from  the lorax

Explanation:

4 0
3 years ago
Write a modular program that allows the user to enter a word or phrase and determines whether the word or phrase is a palindrome
Ostrovityanka [42]

Answer:

import java.util.Scanner;

public class num10 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a word");

       String word = in.nextLine();

       String reversed = "";

       //Get the length of the string entered

       int length = word.length();

       //Loop through the string and reverse th string

       for ( int i = length - 1; i >= 0; i-- )

           reversed = reversed + word.charAt(i);

       //Compare the two strings "word" and "reversed"

       if (word.equals(reversed))

           System.out.println(word+" is a palindrome");

       else

           System.out.println(word+" is not a palindrome");

   }

}

Explanation:

Since we know that a palindrome word is a word that reads the same forward and backward, The Idea here is:

  • To obtain a word from a user.  
  • Use a for loop to reverse the word and store in another variable
  • Use if....else to compare the two strings and determine if they are equal, if they are equal then the word is palindrome.
6 0
4 years ago
A construction-based client would like to develop an application that can analyze an image of machinery and overlay information
Elden [556K]

A form of Extended Reality which can best assist the client with information on the repair is: 3. Augmented Reality.

<h3>What is Extended Reality?</h3>

Extended reality refers to an umbrella terminology that is used to describe all real and virtual physical environments (realities) and human-machine interactions through the use of computer technologies and wearables.

<h3>The forms of Extended Reality.</h3>

In Computer technology, there are four (4) main types of Extended Reality and these include:

  • Mixed Reality
  • Haptic Reality
  • Virtual Reality
  • Augmented Reality

Augmented Reality is mainly applied in maintenance and repair by analyzing an image of machineries and provide information that will assist in the repair process.

Read more on Augmented Reality here: brainly.com/question/9054673

4 0
3 years ago
Other questions:
  • Mobile ethnography can be especially useful for documenting public behavior, such as waking up in the morning or administrating
    9·1 answer
  • Woodchucks are classified in the same family as squirrels,but in a different family than mice.Do woodchuck have more in common w
    8·1 answer
  • Uugurfofyhjfsjvrdjctstghfjddd
    13·1 answer
  • The political spectrum spans from Communism on the extreme left to __________ on the extreme right. /8178757/1f6bdbf3?utm_source
    6·2 answers
  • At age 16 Cheyanne just got her drivers license
    5·2 answers
  • Which of the following is not a property of a constructor?A. The name of a constructor can be chosen by the programmerB. A const
    11·1 answer
  • Dell, previously the world’s number one PC manufacturer, has seen its market share shrink because of rivals copying its value ch
    7·1 answer
  • What are some things you can do to clean up your digital footprint.
    9·1 answer
  • 1-5. Discuss briefly the function and benefits of computer network. (5pts​
    8·1 answer
  • What is a digital dashboard, and why are they becoming an increasingly popular tool?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!