Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Scores {
- public float maths;
- public float physics;
- public float programming;
- public Scores(float maths, float physics, float programming) {
- this.maths = maths;
- this.physics = physics;
- this.programming = programming;
- }
- public float Average(){
- float Avg;
- Avg = (this.maths + this.physics + this.programming) / 3;
- return Avg;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement