Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Leejan A.

Tugon
BSCS 1B
201-2463

MODULE 5
Object Oriented Programming

Assessment Task 5-1

Problem 1
Illustrated below is a program skeletal form of class UpaSaWork. Fill in the class methods to accept data
needed in tuples format and return the Netpay of the employee wiyh his/her name as part of the final
output.

Answer:

class UpaSaWork:
def __init__(self, empName, dailyRate, bilangNgAraw, bale):
self.empName = empName
self.dailyRate = dailyRate
self.bilangNgAraw = bilangNgAraw
self.bale = bale

def sweldo(self):
pass

tao1 = UpaSaWork ('Nomer', 1000, 3, 100)


sweldo= tao1.dailyRate*tao1.bilangNgAraw-tao1.bale

print(tao1.empName + "salary is = ", netpay)


Problem 2
Fill in the Barrel class methods to accept the taasand diaHalf of the barrelthen return the
kabuuangSukatand sukatNgLawakof the barrel.

You might also like