Class Student


public class Student extends Human
This class is represents a Student.
  • Field Summary

    Fields inherited from class edu.pdx.cs410J.lang.Animal

    name
  • Constructor Summary

    Constructors
    Constructor
    Description
    Student(String name, ArrayList<String> classes, double gpa, String gender)
    Creates a new Student
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Main program that parses the command line, creates a Student, and prints a description of the student to standard out by invoking its toString method.
    All students say "This class is too much work"
    Returns a String that describes this Student.

    Methods inherited from class edu.pdx.cs410J.lang.Mammal

    giveMilk

    Methods inherited from class edu.pdx.cs410J.lang.Animal

    getName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Student

      public Student(String name, ArrayList<String> classes, double gpa, String gender)
      Creates a new Student
      Parameters:
      name - The student's name
      classes - The names of the classes the student is taking. A student may take zero or more classes.
      gpa - The student's grade point average
      gender - The student's gender ("male", "female", or "other", case insensitive)
  • Method Details

    • says

      public String says()
      All students say "This class is too much work"
      Overrides:
      says in class Human
    • toString

      public String toString()
      Returns a String that describes this Student.
      Overrides:
      toString in class Animal
    • main

      public static void main(String[] args)
      Main program that parses the command line, creates a Student, and prints a description of the student to standard out by invoking its toString method.