lab 8 code

User Generated

Anvsss

Programming

Description

do everything in the instructions file

Unformatted Attachment Preview

10/22/2017 # # # # # https://www.cs.montana.edu/paxton/classes/csci127/inlabs/lab8/lab8.py ----------------------------------------------------CSCI 127, Lab 8 October 24, 2017 Your Name ----------------------------------------------------- # ----------------------------------------------------# Do not change anything below this line # ----------------------------------------------------def print_directory(contacts): print("My Contacts") print("-----------") for person in contacts: print(person) print("-----------\n") # ----------------------------------------------------def main(): champ = Contact("???", "Bobcat", "406-994-0000") president = Contact("Waded", "Cruzado", "406-994-CATS") professor = Contact("John", "Paxton", "406-994-4780") contacts = [champ, president, professor] print_directory(contacts) champ.set_first_name("Champ") president.set_title("President") professor.set_title("Professor") print_directory(contacts) print("The area code for cell number", champ.get_cell_number(), "is", \ champ.get_area_code()) # ----------------------------------------------------main() https://www.cs.montana.edu/paxton/classes/csci127/inlabs/lab8/lab8.py 1/1 10/22/2017 CSCI 127, In-Lab 8 Lab 8: Object Oriented Programming Logistics Due: Tuesday, October 24th no later than midnight. Partner Information: Complete this assignment individually. Submission Instructions: Upload your solution, renamed to YourFirstName-YourLastName.py to the BrightSpace Lab 8 Dropbox. Deadline Reminder: Once this deadline passes, BrightSpace will no longer accept your Python submission and you will no longer be able to earn credit. Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned. Learning Outcome Gain experience with object oriented programming. Assignment A smart phone has the ability to save contact information. In this assignment, you will simulate the contact list for a very simple smart phone. Download lab8.py, rename it according to the instructions above, and make sure you understand it. Take the program above and modify it by adding the missing Contact class such that when the program is run, it produces this output. Grading - 10 points 2 points - The constructor of the Contact class is correct. 2 points - The reader methods of the Contact class are correct. 2 points - The writer methods of the Contact class are correct. 2 points - The method of the Contact class that prints information about a single contact is correct. 2 points - Your program's output matches the output format of the transcript above (1 point for each type of difference up to 2 points). https://www.cs.montana.edu/paxton/classes/csci127/inlabs/lab8/ 1/1 10/22/2017 My Contacts ----------??? Bobcat Waded Cruzado John Paxton ----------My Contacts ----------Champ Bobcat President Waded Cruzado Professor John Paxton ----------- https://www.cs.montana.edu/paxton/classes/csci127/inlabs/lab8/output.txt 406-994-0000 406-994-CATS 406-994-4780 406-994-0000 406-994-CATS 406-994-4780 The area code for cell number 406-994-0000 is 406 https://www.cs.montana.edu/paxton/classes/csci127/inlabs/lab8/output.txt 1/1
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

This a bit different. I have changed variable name...


Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags