FIT1051 Lecture 2: Week 2 Additional
Week 2
NOTE: Case sensitive. All lower case
Thursday, 8 March 2018
10:04 AM
Class template
Visibility Class (keyword) <name of class> {
Instance variables
Visibility private data type name of instance v
Method accessor mutator
Visibility public return data type <name of method> (for input) {
}
}
Driver class
----------
Class Car {
}
Methods needs an input. Class does not require input.
Space in front of method to make reading easier.
If public in front, then everyone has access to it.
In week02
New Person is the object.
Person tania is the reference.
Boolean has 2 values. One is true and one is false.
find more resources at oneclass.com
find more resources at oneclass.com