Student - } // MUTATOR METHODDS public void setGrade(double...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/ public class Student { public Student(int am,String fn,String ln,char sex, double age){ p this.am = am; firstName = fn; lastName = ln; this.sex = sex; this.age = age; grade = 0; absence = 0; } // ACCESSOR METHODS public String getFirstName(){ return firstName; } public String getLastName(){ return lastName; } public double getAge() { return age; } public char getSex() { return sex; } public int getAm() { return am; } public double getGrade(){ return grade; } public int getAbsence() { return absence;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } // MUTATOR METHODDS public void setGrade(double g) { grade = g; } public void setAbsence(int a) { absence = a; } //toString method public String toString(){ p return " AM \t\t:"+ am+"\n ONOMA \t\t:"+firstName+"\n EPITHETO \t:" +lastName+"\n APOUSIES \t:"+absence+"\n BATHMOS \t:"+grade+"\n"; } // Private instance fields private int am,absence; private String firstName,lastName; private char sex; private double age, grade; }...
View Full Document

This note was uploaded on 04/26/2010 for the course COMPUTER S Java2 taught by Professor Kwstasmixail during the Spring '10 term at Technical University of Crete.

Page1 / 2

Student - } // MUTATOR METHODDS public void setGrade(double...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online