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, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 24.06.2019 12:40
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
question
Computers and Technology, 24.06.2019 19:20
Kiesha has a worksheet with a range of cells using the following columns: name, score, group, study group, and date. kiesha needs to sort the worksheet on the date field. which option she use to most efficiently complete this task ? a use the cut and paste option to reorganize the data to fit that order b use the filter function to organize the data based on the date c use the order function to organize the data based on the date d use the sort function to organize the data based on date order
Answers: 3
You know the right answer?
Design an Essay class that is derived from the GradedActivity class presented in this chapter. The E...
Questions
question
Mathematics, 05.07.2019 05:00
question
Mathematics, 05.07.2019 05:00
Questions on the website: 13722362