Skip to main content

Section 2.6 ObjUse-WE3-P1

Subsection 2.6.1 Subgoals for using objects (creating instances)

  1. Declare variable of appropriate class datatype.
  2. Assign to variable: keyword new, followed by class name, followed by ().
  3. Determine whether parameter(s) are appropriate (API)
    1. Number of parameters
    2. Data types of the parameters

Subsection 2.6.2 ObjUse-WE3-P1

Figure 2.6.1.

Exercises Exercises

1.
Q9: Given this code, how many items are in mine?
2.
Q10: Given this code, how many items are in yours?
You have attempted of activities on this page.