Computers and Technology, 17.04.2020 20:05 genyjoannerubiera
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;
};
Answers: 3
Computers and Technology, 23.06.2019 01:30
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
Computers and Technology, 24.06.2019 02:00
Write an expression that will cause the following code to print "equal" if the value of sensorreading is "close enough" to targetvalue. otherwise, print "not equal". ex: if targetvalue is 0.3333 and sensorreading is (1.0/3.0), output is:
Answers: 1
Computers and Technology, 24.06.2019 20:20
Write python code that prompts the user to enter his or her age and assigns the userβs input to an integer variable named age.
Answers: 1
Design an Essay class that is derived from the GradedActivity class presented in this chapter. The E...
English, 10.05.2021 16:10
Mathematics, 10.05.2021 16:10
Chemistry, 10.05.2021 16:10
Chemistry, 10.05.2021 16:10
Social Studies, 10.05.2021 16:10
English, 10.05.2021 16:10
Mathematics, 10.05.2021 16:10
Biology, 10.05.2021 16:10
History, 10.05.2021 16:10