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
kolbaska11 [484]
3 years ago
7

Create a class ""Student"" that will hold an array of grades and has a method to calculate the average. It would also have a met

hod to return any particular grade number (1-14).
Computers and Technology
1 answer:
morpeh [17]3 years ago
5 0

Answer:

#include <iostream>

#include<time.h>

using namespace std;

class Student

{

   public :

   int grades[20]; //array of grades

   

   double average(int arr[],int n) //method to calculate average of array of grades passed

   {

       int sum=0;

       for(int i=0;i<n;i++)  //loop to calculate sum of all grades

           sum=sum+arr[i];

       return sum/n;   //average is sum of items/number of items

   }

   int get_grade() //method to return grade number(1-14)

   {

       srand(time(NULL));  //method to generate different random number each time

       int num = rand() % 14 + 1;  //method to generate random number b/w 1-14

       return num;

   }

};

int main()

{

   Student s;

   int grade[]={5,3,9,8,10};

   cout<<"Average is : "<<s.average(grade,5);

   return 0;

}

OUTPUT :

Average is : 7

Explanation:

A class Student is created in which a method named average is there to calculate average of the grades passed and a method to generate a grade number b/w 1-14.

You might be interested in
For the function below, which variables have the same scope?
steposvetlana [31]

Answer:

numB and power

Explanation:

Correct answer edge 2020

5 0
3 years ago
Read 2 more answers
To mitigate the effects of most of the common network threats including disruption, destruction and disaster, companies are begi
almond37 [142]

Question:

To mitigate the effects of most of the common network threats including disruption, destruction and disaster, companies are beginning to migrate their servers, networking devices and data into professional datacenters. This is called

A) Colocation

B) SAAS

C) Peering

D) Clustering

E) Server Farming

Answer:

The correct answer is A) Colocation

Explanation:

Colocation as already defined is the voluntary relocation of all network facilities to a data centre so as to reduce the risks of disaster, disruption, destruction, intrusion whilst increasing security, flexibility and scalability at a lower cost.

As the world gets more digitized, datacentres are getting more patronage. The sales figures show this.

Cheers!

6 0
3 years ago
The Gramm-Leach-Bliley Act contains a rule that ensures security and confidentiality of customer information, protects against a
ValentinkaMS [17]

Answer:

b. The Safeguards Rule

Explanation:

According to a different source, these are the options that come with this question:

a. The Information Assurance Rule

b. The Safeguards Rule

c. The Safety Rule

d. The Guardian Rule

This rule is called the <em>Safeguards Rule</em>, and it comes from the Gramm–Leach–Bliley Act (GLBA), also known as the Financial Services Modernization Act of 1999. This is an act of Congress signed by President Bill Clinton that removed barriers among banking companies, securities companies and insurance companies. This meant that organizations such as commercial banks, investment banks, securities firms, and insurance companies were able to consolidate.

7 0
4 years ago
Read 2 more answers
Several words separated by spaces used in place of a password are called what?
gavmur [86]
Answer is a passphrase

Passphrase consists of characters longer than passwords used in creating digital signatures. As compared to passwords, passphrases are easier to remember and considered more secure due to the overall length. Both Passphrase and passwords serve the same purpose of securing sensitive information.

7 0
3 years ago
PLEASE PLEASE PLEASE PLEASE PLEASE help brainliest goes to correct answer and 50 points You do not have to get all four but plea
DENIUS [597]

Explanation:

1. A.make a list of all the websites the sources from

2. C. profile

7 0
3 years ago
Read 2 more answers
Other questions:
  • Consider this scenario: A major government agency experiences a data breach. As a result, more than 100,000 personal records are
    7·2 answers
  • What is the meaning for science?
    14·1 answer
  • When you align or size a group of selected controls, the changes are made relative to the
    14·1 answer
  • I need help!!!!
    13·2 answers
  • The _______ "represents a set of features that enables the user to inform himself whether a security feature is in operation or
    8·1 answer
  • When was internet started in which year​
    13·2 answers
  • Over the past year alone, more than _________ have been stolen from Target.
    10·2 answers
  • Research and build a chroot jail that isolates ssh users who belong to the restrictssh group. (You will also need to create the
    9·1 answer
  • Design a program that asks the User to enter a series of 5 numbers. The program should store the numbers in a list then display
    14·1 answer
  • How to enter date in a Date/Time field?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!