
Fundamentals of Object-Oriented Programming - C++ - UML Inheritance - Employee Part 2
Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary purpose of the getAddress method in the Address class?
To return or display the address
To delete the address
To set the address properties
To calculate the address length
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of access specifier is used for the properties in the Employee class?
Protected
Private
Default
Public
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method in the Employee class is responsible for associating an address with an employee?
getAddress
setDetails
calculateSalary
displayDetails
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What additional properties does the Manager class have compared to the Employee class?
Title and Department
Postal Code and Country
Hourly Wage and Hours Worked
Street and City
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the Manager class implement polymorphism?
By adding more properties
By changing the access specifier
By overriding the displayDetails method
By using a different class name
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the private properties of the Labourer class?
Title and Department
Hourly Wage and Hours Worked
Street and City
Postal Code and Country
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is the calculateSalary method different for a Labourer compared to a Manager?
It adds a bonus to the salary
It multiplies hourly wage by hours worked
It deducts taxes from the salary
It returns a fixed salary
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?