After the user fills in all the entry fields and click on "Add" button, the program checks if the ID already exists. If yes, pop up a message box saying the member ID already exists. Otherwise add the the account to the member account set (a dictionary or list). Disply the new account at the bottom Text field. After the user fills in the ID field and click on "Delete" button, the program checks if the ID already exists. If yes, delete the member associated with the ID. Otherwise, pop up a message box saying the member does not exists After the user fills in the ID field and click on “Edit" button, the program checks if the ID already exists. If yes, the program extracts the user input from the Phnoe and Weight fileds and update this member info accordingly. Otherwise, pop up a message box saying the member does not exists. Update cannot be made. After the user fills in the ID field and click on "Search" button, the program checks if the ID already exists. If yes, the program displays all information (Name, Phon, Weigh, Gender) of the member associated with the ID at the coresponding widget. Otherwise, pop up a message box saying the ID does not exists. After the user clicks on the "View All" button, the program displays all member info at the Text widget. b) d)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

class ClubMember:

def __init__(self,id,name,gender,weight,phone):
self.id = id
self.name = name
self.gender = gender
self.weight = weight
self.phone = phone

def __str__(self):
return "Id:"+str(self.id)+",Name:"+self.name+",Gender:"+self.gender+",Weight:"+str(self.weight)+",Phone:"+str(self.phone)


class Club:

def __init__(self,name):
self.name = name
self.members = {}
self.membersCount = 0

def run(self):
print("Welcome to "+self.name+"!")
while True:
print("""
1. Add New Member
2. Delete a Member
3. Search for a member
4. Browse All Members
5. Edit Member
6. Exit
""")

choice = int(input("Choice:"))

if choice == 1:
self.membersCount = self.membersCount+1
id = self.membersCount
name = input("Member name:")
gender = input("Gender:")
weight = int(input("Weight:"))
phone = int(input("Phone No."))

member = ClubMember(id,name,gender,weight,phone)
self.members[id] = member
elif choice == 2:
id = int(input("Enter id of member to delete:"))
del self.members[id]
break
elif choice == 3:
id = int(input("Enter member id to search:"))
member = self.members[id]
print(member)
elif choice == 4:
print("Details of All members:")
for member in self.members.values():
print(member)
elif choice == 5:
id = int(input("Enter id of member to edit:"))
self.members[id].weight = int(input("Enter new weight of member:"))
self.members[id].phone = int(input("Enter new phone no. of member:"))
elif choice == 6:
break

club = Club("Weight Loss Club")
club.run()

After the user fills in all the entry fields and click on “Add" button, the program checks if the
ID already exists. If yes, pop up a message box saying the member ID already exists.
a)
Otherwise add the
the account to the member account set (a dictionary or list). Disply the new account at the
bottom
Text field.
b)
After the user fills in the ID field and click on “Delete" button, the program checks if the ID
already exists. If yes, delete the member associated with the ID. Otherwise, pop up a message
box saying the member does not exists
After the user fills in the ID field and click on “Edit" button, the program checks if the ID
already exists. If yes, the program extracts the user input from the Phnoe and Weight fileds
and update this member info accordingly. Otherwise, pop up a message box saying the
member does not exists. Update cannot be made.
After the user fills in the ID field and click on "Search" button, the program checks if the ID
already exists. If yes, the program displays all information (Name, Phon, Weigh, Gender) of
the member associated with the ID at the corresponding widget. Otherwise, pop up a
message box saying the ID does not exists.
After the user clicks on the "View All" button, the program displays all member info at the
Text widget.
c)
d)
e)
f)
After the user exits the program, the program should dump all up-to-date member
information to the pickle file.
Transcribed Image Text:After the user fills in all the entry fields and click on “Add" button, the program checks if the ID already exists. If yes, pop up a message box saying the member ID already exists. a) Otherwise add the the account to the member account set (a dictionary or list). Disply the new account at the bottom Text field. b) After the user fills in the ID field and click on “Delete" button, the program checks if the ID already exists. If yes, delete the member associated with the ID. Otherwise, pop up a message box saying the member does not exists After the user fills in the ID field and click on “Edit" button, the program checks if the ID already exists. If yes, the program extracts the user input from the Phnoe and Weight fileds and update this member info accordingly. Otherwise, pop up a message box saying the member does not exists. Update cannot be made. After the user fills in the ID field and click on "Search" button, the program checks if the ID already exists. If yes, the program displays all information (Name, Phon, Weigh, Gender) of the member associated with the ID at the corresponding widget. Otherwise, pop up a message box saying the ID does not exists. After the user clicks on the "View All" button, the program displays all member info at the Text widget. c) d) e) f) After the user exits the program, the program should dump all up-to-date member information to the pickle file.
2. Create GUI for the Weight Management Club program (based on Assignment 6).
Weight Mana.
ID 1002
Add
Name Name2
Delete
Phone 485-321-2775
Edit
Weight 374
Search
Gender O Male C Female
Namel
1001
613-448-5420
298
Name2
1002
View All
485-321-2775
374
Name3
1003
4004
Transcribed Image Text:2. Create GUI for the Weight Management Club program (based on Assignment 6). Weight Mana. ID 1002 Add Name Name2 Delete Phone 485-321-2775 Edit Weight 374 Search Gender O Male C Female Namel 1001 613-448-5420 298 Name2 1002 View All 485-321-2775 374 Name3 1003 4004
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 8 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY