DeanConsulting
Programmer
A few months ago I asked a question about getting a design right. I got several great answers but had to put every thing on hold for a couple of months.
I would like some comments/suggestions on the following "class diagram" that I am trying to create.
Statement:
Keep up with contact information which includes name,address,city,state,zip,phone,and email. You will be able to add,edit,delete contacts from a database. You can also print the entire contact list. The program will be a GUI program written for Windows using C#.
Nouns(Classes)
--------------
contact
name
address
city
state
zip
phone
email
database
gui
Verbs(Methods)
--------------
Add
Edit
Delete
View
Print
Save
Load
This is what I have designed so far:
Class: Contact
Properties: name
Methods: GetName,SetName,add,edit,delete
Class: Address
Properties: address,city,state,zip,phone,email
Methods: GetAddress,SetAddress,GetCity,SetCity,GetState,SetState,GetZip,SetZip,GetPhone,SetPhone,GetEmail,SetEmail
Class: Database
Properties: connectionString
Methods: Save,Load,Print
Class: GUI
Properties:txtName,txtAddress,txtCity,txtState,txtZip,txtPhone,txtEmail,btnAdd,btnEdit,btnDelete,btnPrint,List:Contacts
Methods: DisplayContact(Contact)
My question, am I even anywhere close to doing this right?
nb
---------------------------------------
Noble D. Bell
I would like some comments/suggestions on the following "class diagram" that I am trying to create.
Statement:
Keep up with contact information which includes name,address,city,state,zip,phone,and email. You will be able to add,edit,delete contacts from a database. You can also print the entire contact list. The program will be a GUI program written for Windows using C#.
Nouns(Classes)
--------------
contact
name
address
city
state
zip
phone
database
gui
Verbs(Methods)
--------------
Add
Edit
Delete
View
Save
Load
This is what I have designed so far:
Class: Contact
Properties: name
Methods: GetName,SetName,add,edit,delete
Class: Address
Properties: address,city,state,zip,phone,email
Methods: GetAddress,SetAddress,GetCity,SetCity,GetState,SetState,GetZip,SetZip,GetPhone,SetPhone,GetEmail,SetEmail
Class: Database
Properties: connectionString
Methods: Save,Load,Print
Class: GUI
Properties:txtName,txtAddress,txtCity,txtState,txtZip,txtPhone,txtEmail,btnAdd,btnEdit,btnDelete,btnPrint,List:Contacts
Methods: DisplayContact(Contact)
My question, am I even anywhere close to doing this right?
nb
---------------------------------------
Noble D. Bell