Homework


Scenario

Its your first day of class when Mr. Mortenson asks you to identify all the students and list some characteristics about them. Create a class to use as a template to create student objects and create 3 imaginary students.

Instructions

  1. Create a class
    • Instance variables:
    • String name
    • int grade
    • int pets
    • int siblings
    • MAKE YOUR OWN
  2. In main:
    • Create three student objects.
//Code Here

New Scenario

You find out that one of the students that you created an object for goes by a nickname. Using your knowledge of reference variables, create another object that references back to the same student.

Instructions

  1. Use your previous code

  2. In main:

    • Create a reference variable with a different name that points to the same student.
    • Output the instance attributes of this student

//Code Here