A compound assignment operator like += or -= is an operator that does two things at the same time: first, it peforms a calculation; and second, it assigns the calculated value to a variable or constant.
Compound Assignment Operators
A compound assignment operator like += or -= is an operator that does two things at the same time: first, it peforms a calculation; and second, it assigns the calculated value to a variable or constant.
Review the following two examples:
totalPoints += 95; same as totalPoints = totalPoints + 95
finalGrade -= 30; same as finalGrade = finalGrade – 30
With your teammates, discuss the possible benefits, if any, of using a compound operator vs. the alternative. Can you think of any drawbacks to using compound operators?
Discussion Question: Collaborative Debugging
Discuss your work on this week’s coding assignment by posting the following to the discussion:
A description of any problem(s) you ran into when you tried to code and test this week’s program, accompanied by a screenshot of your buggy Java™ code along with a screenshot of your running program, if needed
The steps you took to fix those problems (if you were able to fix them). Are you eyeballing the code? Relying on the debugger? A combination?
Suggestions for helping a classmate fix his or her buggy Java™ code
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
