Team Management OOP Style, computer science homework help

Anonymous
timer Asked: Jul 5th, 2016
account_balance_wallet $5

Question Description

  • Team Management OOP Style

    Your program for keeping track of team members is coming along, but now you want to be able to include phone numbers and jersey numbers along with your team member’s name. Modify your program from week 4 so that the program utilizes object-oriented programming to create a member object which can accept the player’s name, phone number, and jersey number. You will need to replace the list with a dictionary to help in locating objects for removal and editing. Again, File Access for long-term storage is not required for this assignment.

    For this project:

    • You will submit your python code in either the original .py file, or copied into a .txt file.
    • A screenshot of your code having been executed (run). How to Take a Screenshot

    Tips: While dictionaries resemble lists, remember that they are not the same! It is better to use FOR loops, not WHILE loops with index values.

    Your class structure does not need a full set of accessor and mutator methods getName(), setName(newName), however it they will be helpful in the next week.

Note:  I'm enclosing a copy of the week 4 answer you gave me for your reference.  Please let me know if you need something else to complete this assignment,  Thanks

import sys members=[] def printMenu(): print("===========Main Menu===========") print("1. Display Team Roster.") print("2. Add Member.") print("3. Remove Member.") print("4. Edit Member.") print("9. Exit Program.") while True: printMenu() sel=int(input("Selection>")) if sel==1: for i in members: print(i) if sel==2: name=input("Enter new member's name: ") members.append(name) if sel==3: name=input("Enter member name to be removed: ") members.remove(name) if sel==4: name=input("Enter the name of the memeber you want to edit: ") i=members.index(name) name2=input("Enter the new name of the member: ") members.remove(name) members.insert(i,name2) if sel==9: sys.exit()

Tutor Answer

DrCS
School: Purdue University

Your code is done:Here is the sample output:===========Main Menu===========1. Display Team Roster.2. Add Member.3. Remove Member.4. Edit Member.9. Exit Program.Selection>2Enter new member's name: abcEnter new member's phone number: 444Enter new member's jersey number: 23===...

flag Report DMCA
Review

Anonymous
awesome work thanks

Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors