COMP 202 Lecture Notes - Lecture 21: Object-Oriented Programming, National Technical Research Organisation

33 views2 pages
jc123 and 40170 others unlocked
COMP 202 Full Course Notes
100
COMP 202 Full Course Notes
Verified Note
100 documents

Document Summary

Comp 202 lecture 21 intro to objects. String as reference types: strings are immutable reference types, you cannot change the contents of a variable of type string after creation. The computer creates a reference type variable called phrase and initializes it with 4 characters. They are more secure and more intuitive to use. Objects: object oriented programming, data structures that contain data in form of fields often known as attributes; and code in form of procedures often known as methods. Classes: in java in order to create your own object, the class acts as a blueprint o. Every student class" has the following floating variables as properties. Attributes: each has a access modifier: a keyword describing how the data can be accessed, a type, a variable name: used to access this property. Creating a student object o: the variable s is an instance of the student class.

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

Related Questions