You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/ch7_recursion.ptx
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -238,6 +238,7 @@ def main():
238
238
main()
239
239
</code>
240
240
</program>
241
+
</listing>
241
242
242
243
<p><idx>separation of concerns</idx>
243
244
The key insight here is called the <term>separation of concerns</term>. The public <c>sum_array</c> method provides a user-friendly interface—callers just pass an array and get the sum. Users don't need to know about indexes or how the recursion works internally. The private <c>_sum_helper</c> method handles the recursive logic with the extra parameter needed to track progress through the array.
Copy file name to clipboardExpand all lines: source/ch8_filehandling.ptx
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -73,10 +73,10 @@
73
73
74
74
75
75
<p>
76
-
We will now create a <c>File</c> object. It is important to create a meaningful name for the <c>File</c> object. We will call ours <c>myFile</c>, and we will call our class <c>CreateFileObject</c>.
76
+
We will now create a <c>File</c> object. It is important to create a meaningful name for the <c>File</c> object. We will call ours <c>myFile</c>, and we will call our class <c>CreateFileObject</c>. <xrefref="create-file-object-java"text="type-global"/> shows the code to create a <c>File</c> object in Java.
0 commit comments