CS 1114 Chapter 1: CS-1114 - Notes - Reading 1

106 views1 pages

Document Summary

A class describes all objects of a given classification, while objects are usually an instance the two words are often used interchangeably. Classes will always start with an uppercase letter, while objects start with a lowercase letter: methods allow one to manipulate a given object; methods are typically called or invoked, parameters are additional values required by some methods. Example: void movehorizontal(int distance)in this case, the first part is the method header and the information inside the parentheses is the require parameter each with its own type and name. The method"s header and types form the method"s signature. Once a class has been established, one can create many objects/instances. Each object can have its own characteristics: the state of a given object refers to all attributed defining an object (i. e. x- position, y-position, color, diameter, etc. ). Java refers to each of these attributes as fields. Sometimes, objects are able to create other objects and can call each other"s methods.

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