Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package subscribers;
- public class Student extends Subscriber {
- /* properties */
- private double average;
- /* set, get methods */
- /* constructors */
- public Student(String name, double average) {
- super(name);
- this.average = average;
- }
- /* methods */
- @Override
- public String toString() {
- return String.format("%s\tavg=%.2f",
- super.toString(), average);
- }
- public void doHomework() {
- }
- }
Add Comment
Please, Sign In to add comment