method within Grade class called (Calculate_GradeAverage ()) that calculates and returns the average score for each student according to the following mark distribution: 1) 40 % for all assignments (s_grade_Ass1 for Assignment 1), (s_grade_Ass2 for Assignment 2), (s_grade_Ass3 for Assignment 3) 2) 30 % for Mid Term Exam (s_grade_Mt) 3) 30 % for Final

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

• Add a method within Grade class called (Calculate_GradeAverage ()) that calculates and
returns the average score for each student according to the following mark distribution:
1) 40 % for all assignments (s_grade_Ass1 for Assignment 1), (s_grade_Ass2 for
Assignment 2), (s_grade_Ass3 for Assignment 3)
2) 30 % for Mid Term Exam (s_grade_Mt)
3) 30 % for Final Exam (s_grade_Ft) 

package com.example.studentgradeproject;

public class Grade {


private int student_id ;
private String student_lname;
private String student_fname;
private int s_grade_Assignment1;
private int s_grade_Assignment2;
private int s_grade_Assignment3;
private int s_grade_Mid_Term;
private int s_grade_Final_Term;
public static int credits;

public Grade(){

this.student_id=0;
this.student_fname="";
this.student_lname="";
this.s_grade_Assignment1=0;
this.s_grade_Assignment2=0;
this.s_grade_Assignment3=0;
this.s_grade_Mid_Term=0;
this.s_grade_Final_Term=0;

}

public Grade(int student_id, String student_lname, String student_fname, int s_grade_Assignment1,
int s_grade_Assignment2, int s_grade_Assignment3, int s_grade_Mid_Term,
int s_grade_Final_Term) {
this.student_id = student_id;
this.student_lname = student_lname;
this.student_fname = student_fname;
this.s_grade_Assignment1 = s_grade_Assignment1;
this.s_grade_Assignment2 = s_grade_Assignment2;
this.s_grade_Assignment3 = s_grade_Assignment3;
this.s_grade_Mid_Term = s_grade_Mid_Term;
this.s_grade_Final_Term = s_grade_Final_Term;
}

public int getStudent_id() {
return student_id;
}

public String getStudent_lname() {
return student_lname;
}

public String getStudent_fname() {
return student_fname;
}

public int getS_grade_Assignment1() {
return s_grade_Assignment1;
}

public int getS_grade_Assignment2() {
return s_grade_Assignment2;
}

public int getS_grade_Assignment3() {
return s_grade_Assignment3;
}

public int getS_grade_Mid_Term() {
return s_grade_Mid_Term;
}

public int getS_grade_Final_Term() {
return s_grade_Final_Term;
}

public void setStudent_id(int student_id) {
this.student_id = student_id;
}

public void setStudent_lname(String student_lname) {
this.student_lname = student_lname;
}

public void setStudent_fname(String student_fname) {
this.student_fname = student_fname;
}

public void setS_grade_Assignment1(int s_grade_Assignment1) {
this.s_grade_Assignment1 = s_grade_Assignment1;
}

public void setS_grade_Assignment2(int s_grade_Assignment2) {
this.s_grade_Assignment2 = s_grade_Assignment2;
}

public void setS_grade_Assignment3(int s_grade_Assignment3) {
this.s_grade_Assignment3 = s_grade_Assignment3;
}

public void setS_grade_Mid_Term(int s_grade_Mid_Term) {
this.s_grade_Mid_Term = s_grade_Mid_Term;
}

public void setS_grade_Final_Term(int s_grade_Final_Term) {
this.s_grade_Final_Term = s_grade_Final_Term;
}

@Override
public String toString() {
return "Grade{" +
"student_id=" + student_id +
", student_lname='" + student_lname + '\'' +
", student_fname='" + student_fname + '\'' +
", s_grade_Assignment1=" + s_grade_Assignment1 +
", s_grade_Assignment2=" + s_grade_Assignment2 +
", s_grade_Assignment3=" + s_grade_Assignment3 +
", s_grade_Mid_Term=" + s_grade_Mid_Term +
", s_grade_Final_Term=" + s_grade_Final_Term +
'}';
}
}

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
void method
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