- This event has passed.
7pm – Intro to Java – Roland
May 1 @ 7:00 pm - 8:00 pm
Today We Did
- Homework Review
- TellMeYourAgeOOP.java
- SchoolSystem Project
- Student.java and Teacher.java
- Constructors
- Attributes & Private Variables
- Getters & Setters
- Student.java and Teacher.java
- Homework Review
Homework
- Create a new Java file May1_Classes.java and create the program below.
- Make an Animal class
- The animal class should have the following attributes (make sure they’re set to private!)
- name (string)
- type (string)
- age (int)
- can_fly (boolean)
- Create getters and setters for every attribute
- Make a void method called “printInfo” which prints out all the attributes in a single line
- You have the freedom to make it say whatever as long as all of the class’s attributes are printed in the same message
- The animal class should have the following attributes (make sure they’re set to private!)
- Make an Animal class
- Upload your answer to google drive before next week Tuesday night.
If you have any questions feel free to email me rolandyang@ayclogic.com