Creating Uruk Hais
From Huben's Wiki
(→Summation) |
|||
Line 154: | Line 154: | ||
Please write in your own words: | Please write in your own words: | ||
+ | # The difference between a variable of some class type and an object of that class. | ||
+ | # What the 'new' keyword signifies. | ||
+ | # What is the method after the 'new'? | ||
# The difference between static and non-static for variables. | # The difference between static and non-static for variables. | ||
# The difference between static and non-static for methods. | # The difference between static and non-static for methods. | ||
# The difference between public and private for variables and methods. | # The difference between public and private for variables and methods. | ||
− | |||
− | |||
# Add a private instance variable to UrukHai: your choice. | # Add a private instance variable to UrukHai: your choice. | ||
# Write an accessor and a modifier for the new instance variable. | # Write an accessor and a modifier for the new instance variable. | ||
# Set the new instance variable in Saruman.main() for each of the two instances. | # Set the new instance variable in Saruman.main() for each of the two instances. | ||
# Change the declaim method to show the new instance variable also. | # Change the declaim method to show the new instance variable also. |