Modify StudentRecord.java as following: • Add setMathGrade(double grade) method • Add setEnglish Grade(double grade) method • Add setScienceGrade(double grade) method Modify Student RecordExample.java as following: • Display the name of the students, grades in English, Math and Science, and the average Run StudentRecordExample application. Below is the sample output General Output Anna 90.0 80.0 70.0 80.0 Bea 81.4 85.0 86.5 84.3 Cris 90.0 88.0 86.7 88.23333333333333 Process completed. -Co

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please show your code and result to solve this. 

 

Verify the result
General Output
Anna
Process completed.
Modify StudentRecord.java as following:
Add setMathGrade(double grade) method
• Add setEnglish Grade(double grade) method
Add setScienceGrade(double grade) method
Modify StudentRecordExample.java as following:
• Display the name of the students, grades in English, Math and Science, and
the average
Run StudentRecordExample application. Below is the sample output
General Output
Anna
90.0
80.0
70.0
80.0
Bea
81.4
-Config
85.0
86.5
84.3
Cris
90.0
88.0
86.7
88.23333333333333
Process completed.
Transcribed Image Text:Verify the result General Output Anna Process completed. Modify StudentRecord.java as following: Add setMathGrade(double grade) method • Add setEnglish Grade(double grade) method Add setScienceGrade(double grade) method Modify StudentRecordExample.java as following: • Display the name of the students, grades in English, Math and Science, and the average Run StudentRecordExample application. Below is the sample output General Output Anna 90.0 80.0 70.0 80.0 Bea 81.4 -Config 85.0 86.5 84.3 Cris 90.0 88.0 86.7 88.23333333333333 Process completed.
Objective:
Procedure:
To create a class in developing a Java program
1. Create StudentRecord.java using the editor of your choice
StudentRecord.java
public class Student Record [
//intance variables.
private String name:
private double mathGrade/
private double englishGrade;
private double scienceGrade;
private double average:
8
//static variables.
private static int student Count 0,
//returns the name of the student.
public String getName () {
}
}
//changes the name of the student.
public void setName (String temp) {
name-temp;
}
return name;
/*computes the average of english, math, and science
'grade
*/
public double getAverage () {
double result = 0;
result
return result;
}
2. Create StudentRecordExample.java using the editor of your choice
(mathGrade+englishGrade+scienceGrade) /3;
StudentRecordExample.java
public class Student RecordExample (
public static void main(String[] args) {
//create three objects for student record
Student Record annaRecord = new StudentRecord();
Student Record beahRecord new Student Record();
Student Record crisRecord new StudentRecord();
//set the name of the students
annaRecord.setName ("Anna");
beahRecord.setName ("Beah");
crisRecord.setName ("Cris");
//print anna's name
System.out.println (annaRecord.getName());
Transcribed Image Text:Objective: Procedure: To create a class in developing a Java program 1. Create StudentRecord.java using the editor of your choice StudentRecord.java public class Student Record [ //intance variables. private String name: private double mathGrade/ private double englishGrade; private double scienceGrade; private double average: 8 //static variables. private static int student Count 0, //returns the name of the student. public String getName () { } } //changes the name of the student. public void setName (String temp) { name-temp; } return name; /*computes the average of english, math, and science 'grade */ public double getAverage () { double result = 0; result return result; } 2. Create StudentRecordExample.java using the editor of your choice (mathGrade+englishGrade+scienceGrade) /3; StudentRecordExample.java public class Student RecordExample ( public static void main(String[] args) { //create three objects for student record Student Record annaRecord = new StudentRecord(); Student Record beahRecord new Student Record(); Student Record crisRecord new StudentRecord(); //set the name of the students annaRecord.setName ("Anna"); beahRecord.setName ("Beah"); crisRecord.setName ("Cris"); //print anna's name System.out.println (annaRecord.getName());
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education