LONG ONE MAN

docx

School

Texas Southern University *

*We aren’t endorsed by this school

Course

304

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by MateRainDuck43

Report
Name: CHARLES Assignment for Nov. 3, 2022 Description: Modify the given Python program according to the requirements given. Submission Requirements: Upload to Blackboard the following two items. 1. Create a shared folder on OneDrive with the name Nov. 3. 2. Upload this document that contains your answers to the questions within this document to OneDrive. 3. Upload the modified Python program in the Student.py to OneDrive. Be sure the file has a .py extension. 4. Submit the URL to the shared folder to Blackboard. Program Modification Requirements: Modify the given program by adding code for the following. Be sure to add docstrings for each requirement. 1. Add the attribute Address to the constructor. 2. Define a new method setAddress() to reset Address . 3. Add the attribute State to the constructor and set its value to TX . 4. Define a new method setState() to reset State . 5. Define the method getState() to return the value of State . 6. Define the method getLowScore() to return the lowest score. 7. Modify the __str__ method to return the string representation of the class object so it includes the attributes Address and State . 8. Modify the function main() to instantiate a student with your name with the 10 scores: 80, 90, 90, 80, 90, 80, 90, 100, 80, 70. with state: AZ Questions: 1. Write the statement to print the documentation for the class and all of its methods. student = Student() attrs = vars(student) print(', '.join("%s: %s" % item for item in attrs.items())) 2. Write the Python code of the class constructor. class Student (object):
3. List method headers of the class accessors. Name, state 4. List method headers of the class mutators. Number, address
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help