28 February 2004 - java_dev (original) (raw)

02:45 pm - pyaari - Some advice please? Hi, newbie here. I had to learn Java two years ago during an internship, but I'm finally taking a real course to learn Java. I'm attempting to do an assignment, but I'm terribly confused and my professor has been MIA for the past few days. If someone could shed some light on what I'm trying to do, I'd be very grateful.The assignment is to design an address book using specific classes. **( These are the classes I've designed thus far:Collapse )**I am supposed to define a class PersonContactInformation to store all the typical contact information (name, address, etc.) I can manage with the simple stuff like name, email, birthdate, but I'm getting really confused when it comes to addresses and telephone numbers. The class should support multiple telephone numbers and addresses (home/business). I suppose with the Address class, the 'type of address' is what I should be using to distinguish the different addresses, but as far as telephone numbers are concerned, I'm at a loss. So I guess my questions are:-Should I amend the Telephone class to classify the number entered as a home, fax, work number? -Should I ask for the user to input the amount of telephone numbers he/she would like to input. From there, I would create a loop to define and initialize that number of objects of Telephone (if that even makes sense). -Should I do a combination of the above?-Or have I completely missed the point and need to do something totally different?I'm sorry if I'm rambling. If anyone has some thoughts on this, I'd really appreciate it.Thank you. :]-Nadia