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
Hitman42 [59]
3 years ago
14

letter grades, whereas other courses assign a percentage between 0 and 100. Still others assign a pass/fail grade. Write an inte

rface named Grade. The toPercent method returns the grade as an integer percentage between 0 and 100 percent. The toString method prints the grade in its "native" format (a percentage, a letter grade, or either "Pass" or "Fail"). The isPass method returns true for a passing grade, false otherwise. The include In Average returns true for letter and numeric grades, but false for pass/fail grades.
Computers and Technology
1 answer:
Dimas [21]3 years ago
6 0

Answer:

See attached file for detailed code.

Explanation:

See attached file.

Download txt
You might be interested in
C++ Code Outputs.
mojhsa [17]

Answer:

#include

#include

#include

#include

using namespace std;

struct courseInfo{

string name;

int unit;

char grade;

};

struct Student {

string fName;

string lName;

string idNumber;

courseInfo courses[2];

int unitCompleted;

double gpa;

};

Student s;

bool openFile(ifstream &in);

void Print_info_one(Student s);

void Read_info(Student &s);

float Find_points(char c) ;

bool openFile(ifstream &inFile){

string line;

int i=0,k=0;

string fName="", lname="", id="", name1="", name2="";

char grade1, grade2;

int unit1, unit2;

if (inFile.is_open())

{

while (getline(inFile, line))

{

while (line[i] != ',')

{

fName += line[i];

i++;

}

i++;

i++;

while (line[i] != ' ')

{

lname += line[i];

i++;

}

i++;i++;

while (line[i] != ' ')

{

id += line[i];

i++;

}

i++;

int count=0;

while (count <2)

{

name1 += line[i];

i++;

if(line[i] == ' ' ) count++;

}

i++;

grade1 = line[i];

i++;i++;

unit1 = line[i]-'0';

i++;i++;

count=0;

while (count <2)

{

name2 += line[i];

i++;

if(line[i] == ' ' ) count++;

}

i++;

grade2 = line[i];

i++;i++;

unit2 = line[i]-'0';

}

inFile.close();

s.fName = fName;

s.lName = lname;

s.idNumber = id;

s.courses[0].name = name1;

s.courses[0].grade = grade1;

s.courses[0].unit = unit1;

s.courses[1].name = name2;

s.courses[1].grade = grade2;

s.courses[1].unit = unit2;

s.unitCompleted = unit1 + unit2;

s.gpa = (unit1*Find_points(grade1) + unit2*Find_points(grade2))/(unit1+unit2);

}

else

{

cout << "Error reading file\n";

return false;

}

return true;

}

void Print_info_one(Student s){

cout << "Name: " << s.fName << ", " << s.lName << " ID Number: " << s.idNumber << " Course 1 Name: " << s.courses[0].name << " Grade: "

<< s.courses[0].grade << " Units: " << s.courses[0].unit << " Course 2 Name: " << s.courses[1].name << " Grade: "

<< s.courses[1].grade << " Units: " << s.courses[1].unit << " Unit completed: " << s.unitCompleted << " GPA:" << s.gpa << endl;

}

void Read_info(Student &s){

}

float Find_points(char grade){

switch (grade)

{

case 'A':

return 4.0;

break;

case 'B':

return 3.0;

break;

case 'C':

return 2.0;

break;

case 'D':

return 1.0;

break;

case 'F':

return 0;

break;

default:

break;

}

return 0;

}

int main() {

ifstream inFile;

std::fstream fs;

fs.open ("input.txt", std::fstream::in );

Print_info_one(s);

return 0;

Explanation:

5 0
3 years ago
Solve using the standard algorithm 758 x 92
Ludmilka [50]

Answer:

69736

Explanation:

      758

      <u>x92</u>

     1516

+ <u>6822   </u>

  69736

6 0
3 years ago
Computers store all characters as numbers stored as binary data. Each instruction or symbol gets a bit string assignment. The st
juin [17]

Answer:

0 and 1

Explanation:

Please mark brainliest

7 0
3 years ago
How to make a business plan​
Alborosie

Answer:

Traditional business plan format

Executive summary. Briefly tell your reader what your company is and why it will be successful. ...

Company description. ...

Market analysis. ...

Organization and management. ...

Service or product line. ...

Marketing and sales. ...

Funding request. ...

Financial projections.

Explanation:

Hope it helps

8 0
3 years ago
Which of the following is NOT an example of written communication?
Veronika [31]

Answer:A conversation between co-workers

Explanation:

4 0
3 years ago
Other questions:
  • Sam wants to move from his current role in his organization to a managerial role. Which certification will help him get on a man
    6·1 answer
  • Gary lives in an area that receives a lot of rain throughout the year. which device would be useful to him to maintain his compu
    8·1 answer
  • What is the purpose of the New Window command?
    7·2 answers
  • Write an application program in C++ to implement a class Fibonacci to print Fibonacci series upto N using member function series
    9·1 answer
  • How many sets of number do both Hex and RGB values have?
    10·1 answer
  • B. What significant values have you learned while learning the tools and utensils?
    8·1 answer
  • Explain why microcomputers are installed with TCP/IP protocols?​
    15·1 answer
  • Un polímero sintético es renovable o no renovable
    11·1 answer
  • Ways on how to conserve energy.
    15·1 answer
  • Decades of research throughout the world have found a _____ correlation between academic achievement and socioeconomic status, l
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!