Jump to content
Stef's Coding Community

lynnt

New Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About lynnt

  • Rank
    New member
  1. Good morning - I have a question about UML Diagrams. Let's assume that we have a class called Step. One of Step's properties is stepNo. In a UML Class Diagram, we could use the following to indicate the types that stepNo's getter and setter methods are expected to return. +getStepNo:String +setStepNo:void In a UML Class Diagram, we could use the following to indicate the types that stepNo's getter and setter methods expect to receive as input parameters. +getStepNo() +setStepNo(stepNo:String) For each method, how would we indicate both? In other words, how do we rep
  2. I was experimenting with the access modifiers in Step 17 of Object Oriented PHP for Beginners. I made pinn_number a private property. I used the classes' constructor to set its value. Finally, I created a public function called get_pinn_number(). Outside of the class, I was able to obtain the value of pinn_number using get_pinn_number. I do not understand why this would work. I understand that the value of making properties private is so that their values are available only within the class where they are defined. Therefore, in practice, why would a developer make the value of a pr
×
×
  • Create New...