Solved

CLASS Employee { //Variables

Question 32

Multiple Choice

CLASS Employee {
//Variables
String LastName;
String FirstName;
Real HourlyRate;
Integer HoursWorked;
Date HireDate;
String Job;
//Methods
Real Salary() ;
String GetLastName() ;
String GetFirstName() ;
String GetJob() ;}

-The ability by a program do to the following violates encapsulation principles:


A) Directly Access LastName
B) Retrieve LastName with method GetLastName() ;
C) Retrieve Job with the method GetJob() ;
D) Compute salary with method Salary()

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents