Package bit.connect

Class Student

java.lang.Object
bit.connect.Student

public class Student extends Object
Student is the base class that controls all the information contained within each user's profile.

A Graphics object encapsulates the state information needed for each user that is utilizing the app whether or not they are active. This state information includes the user's:

  • First and last name
  • NetID or username
  • Preffered Pronouns
  • Official Major and Intended Major
  • Interests and intended career path
  • Current location (only used when user is active)
  • Active state
  • Filters to match with other users
  • Past matches
Since:
1.0
  • Constructor Details

    • Student

      public Student(String lastName, String firstName, String netID, String[] pronouns, String realMajor)
      Class constructor. All information should be accessed through the UW Student database. The official major is ensured to be a part of the official list of UW majors, found in the official UW database. All other variables other than those inputted are initialized as empty data- types. The student is added to the list of enrolled students in the Cloud class.
      Parameters:
      lastName - the last name of the student
      firstName - the first name of the student
      netID - the ID of the student, typically taken as the NetID
      pronouns - the pronouns of the student, written as [nominative, accusative, possessive]
      realMajor - the official major of the student
      Throws:
      IllegalArgumentException - if the official major is not a major at UW, typically will not be called
  • Method Details

    • processCreation

      public void processCreation(String intendedMajor, List<String> interests)
      Takes inputs from user instead of from the official database. The intent with this is to create relationships between users based on personality and future goals rather than their current standings.
      Parameters:
      intendedMajor - the intended major of the student, must be a major at UW
      interests - the interests of the student, taken from a pre-set list
      Throws:
      IllegalArgumentException - if the intended major is not a major at UW
    • matchFilters

      public boolean matchFilters(Student student)
      Checks if the student matches the filters of another student. Both users must match the other's filters exactly. If even one does not match the other, the filters do not match.
      Parameters:
      student - the student to compare filters with
      Returns:
      true if the student matches the filters, false otherwise
    • turnSearchMode

      public void turnSearchMode()
      Toggles the search mode of the student. When the student is not actively searching for other users, the coordinates are set to (0.0, 0.0)
    • distance

      public double distance(Student student)
      Calculates the distance between the student and another student.
      Parameters:
      student - the student to calculate the distance to
      Returns:
      the distance between the students
    • toString

      public String toString()
      Returns a string representation of the student.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the student
    • getLast

      public String getLast()
      Returns the last name of the student.
      Returns:
      the last name of the student
    • getFirst

      public String getFirst()
      Returns the first name of the student.
      Returns:
      the first name of the student
    • getId

      public String getId()
      Returns the ID of the student.
      Returns:
      the ID of the student
    • getPronouns

      public String[] getPronouns()
      Returns the pronouns of the student.
      Returns:
      the pronouns of the student
    • getRealMajor

      public String getRealMajor()
      Returns the real major of the student.
      Returns:
      the real major of the student
    • getIntendedMajor

      public String getIntendedMajor()
      Returns the intended major of the student.
      Returns:
      the intended major of the student
    • getInterests

      public List<String> getInterests()
      Returns the interests of the student.
      Returns:
      the interests of the student
    • getCurrLoc

      public double[] getCurrLoc()
      Returns the current location of the student.
      Returns:
      the current location of the student
    • isSearchModeOn

      public boolean isSearchModeOn()
      Returns whether the search mode is on for the student.
      Returns:
      true if the search mode is on, false otherwise
    • getFilters

      public Filter getFilters()
      Returns the filters of the student.
      Returns:
      the filters of the student
    • getPastMatches

      public LinkedList<Student> getPastMatches()
      Returns the past matches of the student.
      Returns:
      the past matches of the student
    • setLast

      public void setLast(String last)
      Sets the last name of the student.
      Parameters:
      last - the last name of the student
    • setFirst

      public void setFirst(String first)
      Sets the first name of the student.
      Parameters:
      first - the first name of the student
    • setId

      public void setId(String id)
      Sets the ID of the student.
      Parameters:
      id - the ID of the student
    • setPronouns

      public void setPronouns(String[] pronouns)
      Sets the pronouns of the student.
      Parameters:
      pronouns - the pronouns of the student
    • setRealMajor

      public void setRealMajor(String realMajor)
      Sets the real major of the student.
      Parameters:
      realMajor - the real major of the student
    • setIntendedMajor

      public void setIntendedMajor(String intendedMajor)
      Sets the intended major of the student.
      Parameters:
      intendedMajor - the intended major of the student
    • setInterests

      public void setInterests(List<String> interests)
      Sets the interests of the student.
      Parameters:
      interests - the interests of the student
    • setCurrLoc

      public void setCurrLoc(double[] currLoc)
      Sets the current location of the student.
      Parameters:
      currLoc - the current location of the student
    • setSearchModeOn

      public void setSearchModeOn(boolean searchModeOn)
      Sets whether the search mode is on for the student.
      Parameters:
      searchModeOn - true if the search mode is on, false otherwise
    • setFilters

      public void setFilters(Filter filters)
      Sets the filters of the student.
      Parameters:
      filters - the filters of the student
    • setPastMatches

      public void setPastMatches(LinkedList<Student> pastMatches)
      Sets the past matches of the student.
      Parameters:
      pastMatches - the past matches of the student