PRG 421 Wk 1 Discussion – Data Hiding

0 items
PRG 421 Wk 1 Discussion - Data Hiding
PRG 421 Wk 1 Discussion – Data Hiding
$3.00
  • Description

PRG 421 Wk 1 Discussion – Data Hiding

Post a total of 3 substantive responses over 2 separate days for full participation. This includes your initial post and 2 replies to other students.

Due Thursday

Respond to the following in a minimum of 175 words:

Data hiding is the way in which programmers implement encapsulation. Java™ programmers use the keywords private and protected to control what data is visible outside of a class; in other words, to control what code can access and manipulate class data.

 

Read Table 1-2, “Determining Access to Class Members,” in “Java – Protected Members Accessed in Derived Class Using Base Class Instance” on the Stack Overflow website.

Note: This table is similar, though not identical, to Table 1-1, “Access Modifiers,” in Ch. 1, “Advanced Class Design,” of OCP: Oracle® Certified Professional Java® SE 8 Programmer II Study Guide.

Discuss the following by posting to the discussion area:

  • If Class A contains private data and Class B inherits from Class A, is it possible to make Class A’s private data visible to Class B? If so, how? Be sure to provide reasons for your answer based on this week’s textbook readings or this week’s assignment code.

 

Due Monday

Reply to at least 2 of your classmates. Be constructive and professional in your responses.