PHYTON OOP: INHERITANCE

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

PHYTON OOP: INHERITANCE

Post by answerhappygod »

PHYTON OOP: INHERITANCE
Phyton Oop Inheritance 1
Phyton Oop Inheritance 1 (52.64 KiB) Viewed 47 times
Activity 1. Create an Employee class with the following attributes and functions: Attributes: • idno • name • job • department . . Functions: • getGross (days, rate) - return computed gross salary days x rate) getTax () - return tax based on gross salary (tax = gross x tax_percentage) .getSss 0-return SSS monthly contribution based on the gross salary getNetSalary (loan) - return computed net salary gross - tax - sss - Ioan totalLoan()). The loan is an object from the Loan class .getEmployeeDetails () - return Employee ID. Name, Job Department 2 Create the Loan class with the following attributes and function: Attributes . loanType loanAmount Functions • addLoan (loantype, Ioanamount) - add loantype and amount to loanType and loanAmount attributes • totalLoan - return the sum of all loans .getAllLoan () - Display the ail loan type and amount 3. Create a main program that will use the Employee and Loan class. In the main program you must input employee and loan details and display the loans and its total computed gross salary, sss tax, and net salary Course Output 1. Create minimum of four classes. 2 Implement inheritance 3. Create a main program that will use the classes.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply