Creating a Class of Job Application form in Python
class JobApplication:
def __init__(self, name, phone, address, experience, appliedPosition):
self.name1 = name
self.phone1 = phone
self.address1 = address
self.experience1 = experience
self.appliedPosition1 = appliedPosition
def name(self):
print(f"The name of the job applicant is {self.name1}")
def phone(self):
print(f"The phone number of the job applicant is {self.phone1}")
def address(self):
print(f"The residential address of the job applicant is {self.address1}")
def experience(self):
print(f"The relevant experience of the job applicant is {self.experience1}")
def appliedPosition(self):
print(f"The job applicant applied for the post of {self.appliedPosition1}")
abdur = JobApplication("Abdur", "03369085972", "Pakistan", "4 years in Pharma company", "Retail Pharmacist")
abdur.name()
abdur.address()
abdur.phone()
abdur.experience()
abdur.appliedPosition()
OR
class JobApplication:
def __init__(self, name, phone, address, experience, appliedPosition):
self.name1 = name
self.phone1 = phone
self.address1 = address
self.experience1 = experience
self.appliedPosition1 = appliedPosition
def getInfo(self):
print(f"The job aaplicant {self.name1} bearing the \
phone number {self.phone1} and a resident of {self.address1} \
having the job experience of {self.experience1} \
has applied for the post of {self.appliedPosition1}")
abdur = JobApplication("Abdur", "03369085972", "Pakistan", "4 years in Pharma company", "Retail Pharmacist")
abdur.getInfo()
Comments
Post a Comment
Write something to CodeWithAbdur!