- Information
- AI Chat
Was this document helpful?
CSC 2660 Final Review 6
Course: Object Oriented Programming (Formerly Csc2650) (CSC2660)
90 Documents
Students shared 90 documents in this course
University: Aurora University
Was this document helpful?
FINAL REVIEW 6
Method Design
This section explains many things about methods. The first thing is that when it comes to
designing a method, doing that will determine how a specific class will be able to define the
behaviors of the method being designed. Another thing about methods is that they can be in
something called an algorithm which is basically a step process that is used for solving
problems. Methods involved in algorithms determine how the method that is involved will
accomplish the goals/tasks that it has.
Method Decomposition
Due to objects not being able to be implemented by only using one method, a method will need
to be turned into multiple methods by decomposing it so the object can be implemented. Usually
when a specific method turns into a complex method it should be decomposed to allow the
program design to be more better and also a bit more organized.
Method Parameters Revisited
In Java, all parameters are usually or mostly passed on by a value which can make it a problem
when it comes to wanting to pass parameters into a method. Reason for this problem is since
passing into a method will result in changes done into the parameter. Parameters aren’t the only
thing that is passed through a method but also class objects. When objects are passed into a
method, usually the object’s reference is what is being actually passed through the method.
Another thing that is also explained here is that any object that is passed to a method will
usually result in both the actual parameters and also the formal parameters to become aliases.
Students also viewed
Related documents
- Java Foundations (Introduction to Program Design and Data Structures) Chapter 5 Section Three
- Java Foundations (Introduction to Program Design and Data Structures) Chapter 5 Section Two
- Java Foundations (Introduction to Program Design and Data Structures) Chapter 5 Section One
- Java Foundations (Introduction to Program Design and Data Structures) Chapter 7 Section Seven
- Java Foundations (Introduction to Program Design and Data Structures) Chapter 7 Section Four
- Java Foundations (Introduction to Program Design and Data Structures) Chapter 7 Section Two