Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Python 3.x OOP/Classes I have started the code but unfortunately there\'s an err

ID: 3918797 • Letter: P

Question

Python 3.x OOP/Classes I have started the code but unfortunately there's an error and I'm having trouble understanding how to fix it, I've tried multiple different attempts so if you don't mind telling me where I went wrong and helping me finish that would be amazing, even if all you do is help me out with the error that would be great.

Code that I wrote so far:

File "C:/Users/a9q1_testing.py", line 58, in
print( coffee_cup.Evidence_Info(defence) )
File "C:Users9q1.py", line 31, in Evidence_Info
if self._Evidence__presenter._Person__clearance <= viewer._Person.__clearance:
AttributeError: 'Person' object has no attribute '_Person'

File that I'm using to check:

Question 1 (15 points): Purpose: To do a bit of Object Oriented Programming Degree of Difficulty: Moderate. The only problem is understanding Phoenix's well-meaning comments Phoenix Wright, ace attorney, has fired his previous tech guy (Larry Butz)... but he still needs special soft- ware for managing his many court-cases. He heard this object-oriented programming style might be a good fit. Phoenix is not a trained computer scientist and unfortunately has trouble describing what he wants for a program. A a9q1 testing.py has been provided that includes Phoenix's thoughts on what he wants. Obtain the file a9q1 testing.py from Moodle, and read it carefully Yourjob is to write a file called a9q1 . py that When imported in a9a1-testing. py, should allow a9q1-testing. py to run without errors. You must implement any classes, attributes, and class methods as specified in 2901-testing. ?? A few things worth noting YOU ARE NOT ALLOWED TO MODIFY a9q1_testing.py IN ANY WAY . You are expected to write proper doc-strings for a9q1.py . Consider carefully what level of access each attribute should have (public, protected, private). If Phoenix has named an attribute, be sure to use that exact name and access level. . Your file should print out some information about evidence and court cases. It should be similar in formatting and content as Phoenix's examples, but does not need to be the exact same

Explanation / Answer

You are getting this error because you are trying to access the private variables of a class which can be done only using getters i did that and after doing that the error you mentioned is gone but i am getting one more error like AttributeError: 'Case' object has no attribute 'Admit_Evidence'

I think you need to implement this method .PFB the code which i did

class Case(object):
def __init__(self, name, crime, defence, prosecutor, judge, description):
self.__name = name
self.__crime = crime
self.__defence = defence
self.__prosecutor = prosecutor
self.__judge = judge
self.description = description

class Person (object):
def __init__(self,name, role, address, clearance):
self.name = name
self.role = role
self.__address = address
self.__clearance = clearance
  
def getClearance(self):
return self.__clearance;
  

class Evidence(object):
def __init__(self,name, presenter, description):
self.__name = name
self.__presenter = presenter
self.__description = description

def Evidence_Info (self,viewer):
if self.__presenter.getClearance() <= viewer.getClearance():
return "{self.__name},presented by {self.__presenter}: {self.__description}";
else:
return ""