Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- public class Scores {
- public float mathGrade;
- public float physicsGrade;
- public float programmingGrade;
- public void Grade(float math1, float physics1, float programming1){
- this.mathGrade = math1;
- this.physicsGrade = physics1;
- this.programmingGrade = programming1;
- }
- public float avgGrade(){
- float avgGradeForStudent;
- avgGradeForStudent = ((this.mathGrade + this.physicsGrade + this.programmingGrade )/ 3);
- return Math.round(avgGradeForStudent * (float)100) / (float)100;
- }
- public float getMathGrade() {
- return mathGrade;
- }
- public void setMathGrade(float mathGrade) {
- this.mathGrade = mathGrade;
- }
- public float getPhysicsGrade() {
- return physicsGrade;
- }
- public void setPhysicsGrade(float physicsGrade) {
- this.physicsGrade = physicsGrade;
- }
- public float getProgrammingGrade() {
- return programmingGrade;
- }
- public void setProgrammingGrade(float programmingGrade) {
- this.programmingGrade = programmingGrade;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement