Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Essay Class Design an Essay class that extends the GradedActivity class presente

ID: 3766576 • Letter: E

Question

Essay Class


Design an Essay class that extends 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 can be up to 100 and is determinded in the following manner:

Grammar: up to 30 points
Spelling: up to 20 Points
Correct length: up to 20 points
Content: up to 30 points

Demonstrate the class in a simple pseudocode/algorithm program.

Once you have designed the class, design a program that prompts the user to enter the number of points that a student has earned for grammar, spelling, lenght, and content. Create an Essay object and store this data in the object. Use the object's methods to get the student's overall score and the grade, and display this data on the screen.

Please no " import java.util.Scanner; " Pseudocode/ Algorithm only please!

Explanation / Answer

Here is the pseudocode

public class GradeActivity{
//declare variables
int grammar,spelling,correctLength,content;

//declare constructor
public GradeActivity(int grammar,int spelling,int correctLength,int content){
......
}

//getter setter methods
public void getGrammar(){
return gramamr;
}
public int setGrammar(int grammmar){
this.grammmar = grammmar;
}
.....remainig getter setter methods

//it will return total points secured by students in all aspects
public int get StudentOverallScore(){
return grammar+spelling+correctLength+content;
}

//functio to get grade
public char getGrade(){
//first getting score
int total = this.StudentOverallScore();
int average = total/4;
//getting average
if(average >= 90){
return 'A';
}
else if(average >= 80){
return 'B';
}
else if(average >= 70){
return 'C';
}
else{
return 'D';
}
}
}


----------------------------------------------------------------------------------------------------------------------------
Essay.java

public class Essay extends GradeActivity{

// we will have constructor eith super
public Essay(int grammar,int spelling,int correctLength,int content){
super(grammar,spelling,correctLength,content);
}


//main method starts
main(){
//reading student score details.....
Essay obj1 = new Essay(..parametres....);

//now call methods using obj1
System.out.println("Total Score: "+obj1.StudentOverallScore());
System.out.println("Grade: "+obj1.getGrade());
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote