Quantcast
Viewing all articles
Browse latest Browse all 15648

VS 2019 Console application that declares 2 classes Employee(base) and Receptionist(derived)

Write a console app that declares two classes Employee(base) and
Receptionist(derived).
• IncludewithinEmployeeclassprivatemembers:emp_name,emp_lastname,
emp_id,emp_physicaladdress and overridable public member Allowance()
which returns the total amount of allowance for each employee which is a sum of
R2500 for the house per month, R1000 for a car per month.
• Allowance()takesthreeargumentswhichishouseAllowance,carallowance
and AllowanceTotal.
• IncludeinReceptionistclassprivatemembers:rec_workinghours,rec_salary,
constant clothingAllowance and public member Allowance() which return
allowance specifically for the receptionist.
• ReceptionisthasadditionalallowanceofclothingwhichisR500permonth
• Derive Receptionist class from Employee class.
• Display respective details about one employee and one receptionist refer to
the table:
(10)
Employee Receptionist
emp_name Given Mahlatse
emp_l.name Romeo Remeo
emp_id 11111 22222
emp_p.address 207 Ext 5 203 Ext 5
Emp_allowance 3500 4000
rec_w.hours 8
rec_salary 2000



Hi all,

Kindly assist, please? I have managed to complete the first two questions of the programming 1b assignment but have been unable to get a breakthrough on question 3. I have created a vb console application and have created the employee class. Would I write the receptionist class(inherits employee) within the employment class above Public Class Employment?

For example:
Public Class Receptionist

Inherits Employee

End Class

Public Class Employee

Private emp_name As String
Private emp_lastname As String
Private emp_id As Integer
Private emp_physicaladdress As String


End Class


Will add a screenshot of my attempt soon.

Thanks in advance for any assistance/advice

Image may be NSFW.
Clik here to view.
Name:  vb_assignment_q3_screenshot.png
Views: 71
Size:  123.6 KB
Image may be NSFW.
Clik here to view.
Name:  vb_assignment_q3_output_screenshot.png
Views: 71
Size:  71.9 KB
Attached Images
Image may be NSFW.
Clik here to view.
 Image may be NSFW.
Clik here to view.
 

Viewing all articles
Browse latest Browse all 15648

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>