From goro@ea.oac.uci.edu  Fri May 29 13:27:50 1998
Received: from taurus.oac.uci.edu (goro@taurus.oac.uci.edu [128.200.80.23]) by moses.ps.uci.edu (8.8.5/) with ESMTP id NAA16533 for <cyu@moses.ps.uci.edu>; Fri, 29 May 1998 13:27:50 -0700 (PDT)
Received: from localhost (goro@localhost) by taurus.oac.uci.edu (8.8.8/8.7.1) with SMTP id NAA26360 for <cyu@moses.ps.uci.edu>; Fri, 29 May 1998 13:27:49 -0700 (PDT)
X-Authentication-Warning: taurus.oac.uci.edu: goro owned process doing -bs
Date: Fri, 29 May 1998 13:27:49 -0700 (PDT)
From: Goro Takei <goro@ea.oac.uci.edu>
X-Sender: goro@taurus.oac.uci.edu
Reply-To: Goro Takei <goro@ea.oac.uci.edu>
To: Clare Yu <cyu@moses.ps.uci.edu>
Subject: Re: Project outlines for Physics 131C/231C
In-Reply-To: <199805272206.PAA12457@moses.ps.uci.edu>
Message-ID: <Pine.GSO.3.96.980529124708.4234B-100000@rigel.oac.uci.edu>
MIME-Version: 1.0
X-Lines: 169
Status: RO
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Content-Length: 3785

Dr. Yu,

below is the outline for my project.  There could be some irrerelvancy in
nested classes.  I am not sure whrere to put the function such as
displaying the whole array of profiles. Please give me some advice on it.
Also I am confused with the derived class and friend class.  Both of them
cannot access the private of the base class, right?  Then what are the
differences or advantages of using either one?

Thank you
Goro Takei

I would like to make a program for address book that can keep track of the
previous contacts made with that person.  It have a capability to do a
conditional search and sorting of the data members.


Each class should have a constructor and a destructor but I will ommit in
this outline.

Class Word;				This stores the character array.

Class Memo;				Bunch of words in an array 
					like in a paragraph.


Class Profile				main class of profile
	private
           Name 	name;
	   Word 	phone_num;
	   Address 	address;
	   Contact 	first_contact;         first day I had contact
	   Contact	last_contact_from;      last day I had contact
						from him
	   Contact	last_contact_to;
	   Contact	contact_history;
	   Profile*	next;			pointer_to _next_person
	   Profile*	previous;		
	   Profile*	first;
	   Profile*	last;			pointer to first/last of
the list

	public
	   add()
           remove()
	   num_links()
	   display()
	   write_to _file()

______________________________
Class Name
   private:	
      Word 	first_name
      Word 	last_name
   public:
      get_name()

______________________________
Class Address
   private:
      Word	street
      Word   	city
      Class Country :: public Word
        private
	Word	country_name

Since Japan and US has different fields for addresses, I will make a
derived class of Country.

Class Japan:: public Country
	private
	   Word	ken
	   Word	yubin


Class US :: public Country
	private
	   Word	state
	   Word	zip

_______________________________
Class Contact
   private
      Media	media;		Using what did I make a contact? (phone,
				fax, e-mail)
      Date	date_of_contact
      Time   	time_of_contact


Class Media
   private
   Word	type_of_media;

Class Date
   private
       int		Month;
       int		Date_of _Month
       int		Year;

Class Time
   private
       int		hour;
       int		minutes

Class Email :: public Class Media
   private
      Word	e-mail_address	
      Memo	subject			brief headline of summary
      Memo	summary

Classs Phone:: public Class Media
   private
      Word	phone_number	
      Memo	subject			brief headline of summary
      Memo	summary


Class Fax :: public Class Media
private
      Word	fax_number
      Memo	subject			brief headline of summary
      Memo	summary

       
Class Letter :: public Class Media
private	
      Memo	subject			brief headline of summary
      Memo	summary

________________________________________________
Class Link_Iterator

Class Search :: public Class Link_Iterator
   public
      Match()				finds the desired field

Class Search_name ::public Class search
public
      Match_name()				finds the desired field
      
Class Search_address::public Class search
public
      Match_address()				finds the desired field
       Find_address()

Class Search_first_contact::public Class search 
public
      Match_fc()				finds the desired field
      Find_fc()

Class Search_last_contact  ::public Class search
public
      Match_lc()				finds the desired field
      Find_lc()

Class Search_contact::public Class search
public
      Match_contact()				finds the desired field
      Find_contact()


Class Sort :: public Class Link_Iterator 
   public
      Sort()			construct new list
      Match()               		finds the desired field
      Reorder()			reorder the field
  private
      Profile 	sorted_list    


