subject

Design an Essay class that is derived from the GradedActivity class presented in this chapter. The Essay class should determine the grade a student receives for an essay. The student's essay score be up tp 100 and is determined in the following manner: Grammer: 30 points Spelling: 20 points Correct length: 20 points Content: 30 points Demonstrate the class in a simple program. use virtual functions, use seperate headers and class files but zip them.

this is my .cpp file

#include "GradedActivity. h"

//

// Member function GradedActivity::getLetterGrade *

//

char GradedActivity::getLetterGrade() const

{

char letterGrade; // To hold the letter grade

if (score > 89)letterGrade = 'A';

else if (score > 79) letterGrade = 'B';

else if (score > 69) letterGrade = 'C';

else if (score > 59) letterGrade = 'D';

else letterGrade = 'F';

return letterGrade;

}

this is the .H file

#ifndef GRADEDACTIVITY_H

#define GRADEDACTIVITY_H

// GradedActivity class declaration

class GradedActivity

{

protected:

double score; // To hold the numeric score

public:

// Default constructor

GradedActivity()

{ score = 0.0; }

// Constructor

GradedActivity(double s)

{ score = s; }

// Mutator function

void setScore(double s)

{ score = s; }

// Accessor functions

virtual double getScore() const

{ return score; }

virtual char getLetterGrade() const;

};

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What is the biggest difference between section breaks and regular page breaks
Answers: 1
You know the right answer?
Design an Essay class that is derived from the GradedActivity class presented in this chapter. The E...
Questions
question
Physics, 06.05.2020 01:21
Questions on the website: 13722360