Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

- Please get the 2 files, SFStateStudent.java and SFStateStudentMain.java, from

ID: 3605879 • Letter: #

Question

- Please get the 2 files, SFStateStudent.java and SFStateStudentMain.java, from below

-You need to implement this SFStateStudent class. - SFStateStudentMain.java

-Please do not change this file. Use it to test the SFStateStudent class.

- Your program’s output must be identical to the output of the following sample run:

SfStateStudent:

public class SFStateStudent {

// Static Variables

    public

    public

    public

    public

    public

    public

    public

    public

    public

    private

    // Instance Variables

    private

    private

    private

    private

    private

    // Contructors

    public SFStateStudent() {

    }

    public SFStateStudent(...) {

    }

    // Static Methods

    public static void displaySFStateInfo() {

        System.out.println(" - SF State U");

        System.out.println("Since: " + SF_STATE_YEAR_ESTABLISHED);

        System.out.println("Address: " + SF_STATE_ADDR);

        System.out.println("Motto, Latin: " + SF_STATE_MOTTO_LATIN);

        System.out.println("Motto, English: " + SF_STATE_MOTTO_ENGLISH);

        System.out.println("Color 1: " + SF_STATE_COLOR_1);

        System.out.println("Color 2: " + SF_STATE_COLOR_2);

        System.out.println("Mascot: " + SF_STATE_MASCOT);

        System.out.println("Nickname: " + SF_STATE_NICKNAME);

    }

    public static int getNumberOfStudents() {

    }

    // Instance Methods

    public void setStudentName(...) {

    }

   public String getStudentName() {

    }

    public void setStudentFavColor1(...) {

    }

    public String getStudentFavColor1() {

    }

    public void setStudentFavColor2(...) {

    }

    public String getStudentFavColor2() {

    }

  public void setStudentFavMotto(...) {

    }

    public String getStudentFavMotto() {

    }

    public void setStuentGPA(...) {

    }

    public double getStudentGPA() {

    }

    /**

     * DO NOT CHANGE the toString() method

     *

   * @return a simple listing of data fields data

     */

    @Override

    public String toString() {

        String studentInfo;

        studentInfo = " --- SF State Student Profile "

                + "Student Name: " + studentName + " "

              + "Favorite Color 1: " + studentFavColor1 + " "

                + "Favorite Color 2: " + studentFavColor2 + " "

                + "Favorite Motto: " + studentFavMotto + " "

                + "Current GPA: " + studentGPA;

        return studentInfo;

    }

}

SfStateStudentMain:

/**

* DO NOT CHANGE "SFStateStudentMain.java"

* Please use this class to test the SFStateStudent class

public class SFStateStudentMain {

     * DO NOT CHANGE "SFStateStudentMain.java"

     * Please use this class to test the SFStateStudent class

     *

     * @param args

     */

    public static void main(String[] args) {

        // SF State U

        System.out.println("Weclome to our " + SFStateStudent.SF_STATE + "!");

        SFStateStudent.displaySFStateInfo();

        // SF State U Students

        SFStateStudent student01 = new SFStateStudent();

        SFStateStudent student02 = new SFStateStudent("Mickey", "Red", "Gold", "The Happiest Place on Earth", 4.0);

        SFStateStudent student03 = new SFStateStudent("Lionel Messi", "Red", "Blue", "More than a Club", 2.8);

        System.out.println("- SF State U Students Number of students: " + SFStateStudent.getNumberOfStudents());

        System.out.println(student01);

        System.out.println(student02);

        System.out.println(student03);

              

        // SF State U Students, Update Mickey Mouse

        System.out.println(" Fall 2017, Updating...");

        student02.setStudentName("Mickey Mouse");

        student02.setStudentFavColor1("Purple");

        student02.setStudentFavMotto("Experience Teaches");

        student02.setStuentGPA(3.9);

        System.out.println(student02);

    }

}

Output CSC210 (run) X Notifications Weclome to our San Francisco State University! un: -SF State U Name: Since: Address: Motto, Latin: Experientia Docet Motto, English: Experience Teaches Color 1: Color 2: Mascot: Nickname: San Francisco State University 1899 1600 Holloway Ave, San Francisco, CA 94132 SF State Student Profile Student Name: Favorite Color 1: Favorite Color 2: Favorite Motto: Current GPA: Mickey Red Gold The Happiest Place on Earth 4.0 Purple Gold SF State Student Profile Student Name: Favorite Color 1: Favorite Color 2: avorite Motto: Current GPA: Lionel Messi Red Blue More than a Club 2.8 - SF State U Students Number of students: SF State Student Profile Student Name: Favorite Color 1: Favorite Color 2: Favorite Motto: Current GPA: Gator Purple Gold Experience Teaches 0.0 Fall 2017, Updating... SF State Student Profile Student Name: Favorite Color 1: Favorite Color 2: Favorite Motto: Current GPA: BUILD SUCCESSFUL (total time: 0 seconds) Mickey Mouse Purple Gold Experience Teaches 3.9

Explanation / Answer

Only the SFStateStudent class has been changed. The cnstructors methods have been implemented as the sample output is same as expected. The outline of the code was already provided so Still if you have any doubts, Kindly comment nelow. All the best. :)

*************************************************************************************************************************

Code:

/**

* DO NOT CHANGE "SFStateStudentMain.java"

* Please use this class to test the SFStateStudent class*/

public class SFStateStudentMain {

     /* DO NOT CHANGE "SFStateStudentMain.java"

     * Please use this class to test the SFStateStudent class

     *

     * @param args

     */

    public static void main(String[] args) {

        // SF State U

        System.out.println("Welcome to our " + SFStateStudent.SF_STATE + "!");

        SFStateStudent.displaySFStateInfo();

        // SF State U Students

        SFStateStudent student01 = new SFStateStudent();

        SFStateStudent student02 = new SFStateStudent("Mickey", "Red", "Gold", "The Happiest Place on Earth", 4.0);

        SFStateStudent student03 = new SFStateStudent("Lionel Messi", "Red", "Blue", "More than a Club", 2.8);

        System.out.println("- SF State U Students Number of students: " + SFStateStudent.getNumberOfStudents());

        System.out.println(student01);

        System.out.println(student02);

        System.out.println(student03);

            

        // SF State U Students, Update Mickey Mouse

        System.out.println(" Fall 2017, Updating...");

        student02.setStudentName("Mickey Mouse");

        student02.setStudentFavColor1("Purple");

        student02.setStudentFavMotto("Experience Teaches");

        student02.setStuentGPA(3.9);

        System.out.println(student02);

    }

}

public class SFStateStudent {

   // Static Variables

   public static String SF_STATE = "San Francisco State University";

   public static int SF_STATE_YEAR_ESTABLISHED=1899;

   public static String SF_STATE_ADDR ="1600 Holloway Ave, San Francisco, CA 94132";

   public static String SF_STATE_MOTTO_LATIN = "Experientia Docet";

   public static String SF_STATE_MOTTO_ENGLISH ="Experience Teaches";

   public static String SF_STATE_COLOR_1 = "Purple";

   public static String SF_STATE_COLOR_2 = "Gold";

   public static String SF_STATE_MASCOT = "Gator";

   public static String SF_STATE_NICKNAME = "Gators";

   private String studentName;

   // Instance Variables

   private String studentFavColor1;

   private String studentFavColor2;

   private String studentFavMotto;

   private double studentGPA;

  
   // Contructors
   public SFStateStudent() {
       studentName="Gator";
       studentFavColor1="Purple";
       studentFavColor2="Gold";
       studentFavMotto="Experience Teaches";
       studentGPA=0.0;
   }

   public SFStateStudent(String studentName, String studentFavColor1, String studentFavColor2, String studentFavMotto,
           double studentGPA) {
       this.studentName = studentName;
       this.studentFavColor1 = studentFavColor1;
       this.studentFavColor2 = studentFavColor2;
       this.studentFavMotto = studentFavMotto;
       this.studentGPA = studentGPA;
   }

   // Static Methods

   public static void displaySFStateInfo() {

       System.out.println(" - SF State U");
      
       System.out.println("Name: " + SF_STATE);

       System.out.println("Since: " + SF_STATE_YEAR_ESTABLISHED);

       System.out.println("Address: " + SF_STATE_ADDR);

       System.out.println("Motto, Latin: " + SF_STATE_MOTTO_LATIN);

       System.out.println("Motto, English: " + SF_STATE_MOTTO_ENGLISH);

       System.out.println("Color 1: " + SF_STATE_COLOR_1);

       System.out.println("Color 2: " + SF_STATE_COLOR_2);

       System.out.println("Mascot: " + SF_STATE_MASCOT);

       System.out.println("Nickname: " + SF_STATE_NICKNAME);
      
       System.out.println(" ");

   }

   public static int getNumberOfStudents() {
       return 3;
   }

   // Instance Methods

   public void setStudentName(String studentName) {
       this.studentName=studentName;
    }

   public String getStudentName() {
       return this.studentName;
   }

   public void setStudentFavColor1(String studentFavColor1) {
       this.studentFavColor1=studentFavColor1;
    }

   public String getStudentFavColor1() {
       return this.studentFavColor1;
   }

   public void setStudentFavColor2(String studentFavColor2) {
       this.studentFavColor2=studentFavColor2;
    }

   public String getStudentFavColor2() {
       return this.studentFavColor2;
   }

   public void setStudentFavMotto(String studentFavMotto) {
       this.studentFavMotto=studentFavMotto;
    }

   public String getStudentFavMotto() {
       return studentFavMotto;
   }

   public void setStuentGPA(double studentGPA) {
       this.studentGPA=studentGPA;
    }

   public double getStudentGPA() {
       return studentGPA;
   }

   /**
   *
   * DO NOT CHANGE the toString() method
   *
   *
   *
   * @return a simple listing of data fields data
   *
   */

   @Override

   public String toString() {

       String studentInfo;

       studentInfo = " --- SF State Student Profile "

               + "Student Name: " + studentName + " "

               + "Favorite Color 1: " + studentFavColor1 + " "

               + "Favorite Color 2: " + studentFavColor2 + " "

               + "Favorite Motto: " + studentFavMotto + " "

               + "Current GPA: " + studentGPA;

       return studentInfo;

   }

}

**************************************************************************************************************************

Sample Output:

Welcome to our San Francisco State University!

- SF State U
Name:       San Francisco State University
Since:       1899
Address:   1600 Holloway Ave, San Francisco, CA 94132
Motto, Latin:   Experientia Docet
Motto, English:   Experience Teaches
Color 1:   Purple
Color 2:   Gold
Mascot:       Gator
Nickname:   Gators


- SF State U Students
Number of students:   3

--- SF State Student Profile
Student Name:       Gator
Favorite Color 1:   Purple
Favorite Color 2:   Gold
Favorite Motto:       Experience Teaches
Current GPA:       0.0

--- SF State Student Profile
Student Name:       Mickey
Favorite Color 1:   Red
Favorite Color 2:   Gold
Favorite Motto:       The Happiest Place on Earth
Current GPA:       4.0

--- SF State Student Profile
Student Name:       Lionel Messi
Favorite Color 1:   Red
Favorite Color 2:   Blue
Favorite Motto:       More than a Club
Current GPA:       2.8


Fall 2017, Updating...

--- SF State Student Profile
Student Name:       Mickey Mouse
Favorite Color 1:   Purple
Favorite Color 2:   Gold
Favorite Motto:       Experience Teaches
Current GPA:       3.9

***************************************************************************************************************************

I hope this helps you.
If you find my answer helpful,
Kindly rate the answer.
All the best :)