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 02:00
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
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, 15.03.2022 08:30
question
Medicine, 15.03.2022 08:30
question
English, 15.03.2022 08:40
question
Mathematics, 15.03.2022 08:40
question
Mathematics, 15.03.2022 08:40
question
Chemistry, 15.03.2022 08:40
question
Health, 15.03.2022 08:40
question
Mathematics, 15.03.2022 08:40
question
Mathematics, 15.03.2022 08:40
Questions on the website: 13722362