Tyrone Berhane wrote:is Encapsulation used to protect the code's Inheritance structure?
My mistake. You are of course correct.Junilu Lacar wrote:The && operator only short circuits if the left side expression evaluates to false
Human fallibility.Junilu Lacar wrote:I'm not sure how you came to think that it does.
Liutauras Vilda wrote:I think better would have been to admit mistake as this explanation isn't correct too
Liutauras Vilda wrote:Not sure why you were using not a short-circuit operator, but rather '&'.
Liutauras Vilda wrote:]What you can say about 'if' statements? Are they really need to be 'if' in all cases? At least one I see a good candidate to swap it to 'else'
Stan Austin wrote:Sorry im not sure i get this, been toying with it for the last 10 mins and I'm getting nothing
1000
1010
990
Liutauras Vilda wrote:There are always a lot to do, start writing code is the latest part you need to sit down and engage to.
Stan Austin wrote:however if i try to print "Employee.salary" it tells me salary is private!
Stan Austin wrote: it must not be edited
Create your own program called Manage; Manage will have 4 functions
1. change the employees income by applying a bonus or penalty.
2. take an array, of employees returning a boolean if two names match
3. return the total sum of all salaries in an array
4. print the name which is first alphabetically
fred rosenberger wrote:you guys missed the most obvious. The first example creates an array where the 2nd and 3rd elements are the same. The second example creates an array where all four elements are distinct.