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
nirvana33 [79]
3 years ago
9

In c++

Computers and Technology
1 answer:
Elodia [21]3 years ago
5 0

Answer:

class studentType: public personType

{

public:

virtual void print() = 0;

virtual void calculateGPA() = 0;

void setID(long id) {

studentId = id;

}

void setCourses(const string c[], int noOfC) {

noOfCourses = noOfC;

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

courses[i] = c[i];

}

}

void setGrades(const char cG[], int noOfC) {

noOfCourses = noOfC;

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

coursesGrade[i] = cG[i];

}

}

long getID() {

return studentId;

}

string* getCourses() {

return courses;

}

char* getGrades() {

return coursesGrade;

}

studentType(string fName = "", string lastName = "",

long id = 0, string c[] = NULL, char cG[] = NULL, int noOfC = 0);

private:

long studentId;

string courses[6];

char coursesGrade[6];

int noOfCourses;

};

Explanation:

Code rewritten

You might be interested in
You wrote a program to allow to guess a number chosen randomly.
Furkat [3]

Answer:

I think its A

Explanation:

5 0
3 years ago
Read 2 more answers
A(n ____________ is considered a named collection of bytes having persistent or lasting storage.
kykrilka [37]
A(n) file is considered a named collection of bytes having persistent or lasting storage.
6 0
3 years ago
What are preconceptions?
anastassius [24]
An idea or statement  that you had previously or earlier.

6 0
3 years ago
Read 2 more answers
Write a program that asks the user to enter two numbers,obtains the two numbers from the user and prints the sum,product,
Andru [333]

Answer:

#include<iostream>

using namespace std;

//main function

int main(){

   //initialization

   float a1,a2;

//display the message

cout<<"Enter the first number: ";

   cin>>a1;  //store the value

   cout<<"Enter the second number: ";

   cin>>a2;   //store the value

   //display the calculation result

   cout<<"The sum is: "<<a1+a2<<endl;

   cout<<"The Subtraction is: "<<a1-a2<<endl;

   cout<<"The product is: "<<a1*a2<<endl;

   cout<<"The Quotient is: "<<a1/a2<<endl;

}

Explanation:

Create the main function and declare the two variables of float but we can enter the integer as well.

display the message on the screen and then store the input enter by the user into the variable using the cin instruction.

the same process for second input as well, display the message and store the input.

after that, print the output of the calculation. the operator '+' is used to add the two numbers like a1+a2, it adds the number stored in the variable.

similarly, the subtraction operator is '-', product '*' and quotient operator '/'.

and finally, we get the desired output.

4 0
3 years ago
A __________ is created by using a secure hash function to generate a hash value for a message and then encrypting the hash code
Maslowich
A Cryptographich hash is created by using a secure hash function to generate a hash value for a message and then encrypting the hash code with a private key.
3 0
3 years ago
Other questions:
  • Assume that word is a variable of type String that has been assigned a value. Assume furthermore that this value always contains
    13·2 answers
  • Which of the following software is cloud-based? OpenOffice Writer Word 2013 Word Online Word Perfect\
    13·2 answers
  • Does the cloud solution offer equal or greater data security capabilities than those pro-vided by your organization’s data cente
    14·1 answer
  • Rock, Paper, Scissors is a two-player game in which each player chooses one of three items. If both players choose the same item
    9·1 answer
  • List six common raster image file types.
    9·1 answer
  • Question 1 of 10 Chase lives in Oregon but works for a company that is located in Florida. What business trend is this an exampl
    11·2 answers
  • (25 POINTS) Some applications work on all devices while others work on some devices. True or False?
    13·1 answer
  • Sub to splashy
    14·2 answers
  • Sample program for Do While loop<br><br> Qbasic
    5·2 answers
  • Which ipconfig command switch would a technician use to display detailed information (such as dns servers and mac addresses)?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!