FIT1051 Lecture 2: Week 2 Additional

85 views1 pages
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
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents