CST141 Project 4: Chapter 11

Triangle and GeometricObject classes
--or--
CommunityMember, Student, and Undergraduate or Graduate classes


  CommunityMember
superclass to Student
  • String firstName
  • String lastName
 
Student
extends from CommunityMember
superclass to Undergraduate and Graduate
  • int studentID
    range: 7000001 - 9999999
  • double gradePointAvg
    range: 0.0 - 4.0
Undergraduate
extends from Student
  • int satScore
    range: 600 - 2400
  • String classYear, e.g.
    "freshman"
    "sophomore"
    "junior"
    "senior"
--or-- Graduate
extends from Student
  • int greScore
    range: 400 - 1600
  • String program, e.g.
    "masters"
    "doctorate"
     
     
--Write either the Undergraduate or Graduate subclass, not both--

  1. The Student class will have four fields (firstName and lastName which it inherits from CommunityMember, and the two of its own, studentID and gradePointAverage
  2. The Undergraduate or Graduate will have six fields (firstName and lastName which it inherits indirectly from CommunityMember, studentID and gradePointAverage which it inherits from Student, and the two of its own, either satScore and classYear for Undergraduate, or greScore and program for Graduate
  1. The superclass/subclass Student has a single constructor that takes four parameters, two of which it passes immediately to its superclass constructor CommunityMember that takes two parameters
  2. The subclasses, either Undergraduate or Graduate, include two constructors: a no-parameter constructor that passes default values (zero (0) for numerics and empty strings for String variables) to the this() constructor and a constructor that takes six parameters, four of which it passes immediately to the superclass constructor of Student that takes four parameters
  1. Including a substantive comment statement that describes the class's purpose, as well as substituting your name for the existing @author comment and the assignment due date for the @version comment that already exist at the top of the new class
  2. Entering a substantive comment before each method (including the constructor) to describe its function along with @param and @return tags