Today in class we learned the nuances of coding, through getter and setter methods. This method allows us to be able to object traits, such as height, gender, etc. Getter and setter methods rely on the use of datatypes, so during the process, it is essential for the user to put in the right datatypes.
int = number
double = decimals
boolean = true/false
char = letter
Finally, after you define the getter and setter methods, you need to add a return value, which like the words says returns whatever you have stored in the object. The computer is dumb in the way that you have to explain to the computer that these variables need to be printed.
Did you learn something new about computer science/programming in this class?
In today’s class, I learned about passing arguments, which simply translates to the arguments you pass to the method. In essence, the argument (which you can view as ArrayList) move to the method (which is ‘class’). I also learned about the ‘class’ syntax structure.
What are the things you have learned?
learned that ‘void’ is a value with no return, which means that if it did hold value the programmer would use int instead.
Did you find it difficult? Compare writing the program in the terminal with the IDE, which one do you prefer?
I believe that writing in BlueJ was much easier, at first the program as a whole looked very confusing and felt like it was color-coded in a random way instead of having a purpose. However, by the end of class, I strongly believe that BlueJ was much easier to look at. Once you get rid of all the useless text it is any other IDE that runs Java,