Question: 2. Question 2 (30 points). Do not forget to write your name and student ID in your an- swer to each question. Replace XXX by

 2. Question 2 (30 points). Do not forget to write your

2. Question 2 (30 points). Do not forget to write your name and student ID in your an- swer to each question. Replace XXX by your student number. Replace YYY by your name in string format. Consider the following class: "IND): class Engineer: def __init__(self, no =XXX, name = YYY, department self.no self.name = name self.department department = no def getName(self): return self.name def print Number(self): print( "The ID number of the engineer is:", self.no) def set Department(self, new Department): self.department = newDepartment Part (a): Write a line of code which creates an Engineer object named Engineerl with attributes of no = 777777, name = "Erol, and department "COE. Part (b): Suppose that Engineer1 decides to change his depart- ment to "IND. Write a line of code which updates the depart- ment of Engineerl accordingly. Part (c): What will be the output of the following line of code: Engineer().print Number()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!