0% found this document useful (0 votes)
44 views1 page

Chapter 4 Outline

1. An object is an instance of a class and classes define an object's behavior. 2. Instantiation creates a new object using a class and defines instance data, while classes can call other classes through their methods. 3. Encapsulation determines variable scope and what data/methods are private or public to a class.

Uploaded by

Howard Giang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

Chapter 4 Outline

1. An object is an instance of a class and classes define an object's behavior. 2. Instantiation creates a new object using a class and defines instance data, while classes can call other classes through their methods. 3. Encapsulation determines variable scope and what data/methods are private or public to a class.

Uploaded by

Howard Giang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Relationship between class and object a. An object is an instance of a class 2. Classes calling other classes 3.

What defines an object s behavior 4. Defining classes, instantiation, instance data a. Instantiation is the process of making a new object b. Data at the top of the program, or the global data 5. Do you need a main method in a class a. No 6. Class methods a. Calling b. Writing 7. Encapsulation a. Variable scope i. Within a method or class ii. Global, private, public data & methods 1. Things that should just stay in the class are private, things that can be changed can be public 8. Methods a. Returning parameters from a method i. You do not always need a return statement 1. Void 2. Constructor b. How to overload i. Signatures ii. More parameters or different type of parameters c. Decomposition d. Do you need anything in the body of a method? i. No e. Formal and actual parameters f. What is 9. Review these classes a. String b. Coin c. Die 10. Short answer a. Writing constructors, methods b. Writing headers i. int ex(double X)

You might also like