5.9 this Keyword
KEY LEARNING OBJECTIVE
Evaluate object reference expressions that use the keyword this.
The keyword “this” is utilized in Java to refer to the current instance of a class. In other words, it helps to clarify what variable you’re referring to within the instance.
public class MyClass {
private int value;
public void setValue(int value) {
this.value = value; // 'this' refers to the instance variable
}
}
QUESTION: How can you use ‘this’ to call a constructor? we can use this to call constructor to call the private int of the value instead of the parameter
5.10 Ethical and Social Implications of Computing Systems
KEY LEARNING OBJECTIVE
Explain the ethical and social implications of computing systems.
Components of Ethical Implications:
-
Legal issues and intellectual property are big concerns in program creation. Licensing open source software is a big issue, as it dictates how programmers need to comply with terms and how software can be distributed and used.
-
Data privacy is also a big issue. There are many data protection laws that programmers need to ensure that their code complies with, especially if their program works with data collection and processing.
Components of Social Implications:
-
There can be harmful impacts from software - malicious software can pose significant __security_ risks___.
-
Software has transformed how people communicate, access information, and interact with each other. Social media platforms, for example, have changed the way society discusses issues, while algorithms can create filter bubbles that limit exposure to diverse opinions.
POPCORN HACKS: (0.2)
Write a two sentence reflection on the social and ethical implications of programming. (0.8)