A society keeps a list of members and uses a program to store the list.For each member, the following information is recorded
membership number
surname
the first name
the date that the person joined the society
whether or not they are still a member
The program is required to offer three options
1) Enter the details of the member(either current or past member).Members may be entered in any order.You can assume the membership number is available from some existing list so just needs to be entered into the program along with other data.
2) Prompt for the current date and produce as output a list of people who have been a member for at least 10years(and still a member currently)The list should be in order of date joined and split up according to how long they have been a member(50+years,40+years etc)If there is more than one person who joined on the same day, they should be given in alphabetical order of surname and if they have same surname, first name.The list should produce by sorting the set of members into the order required.
3)Prompt for membership number and mark the person's membership as not current.
Output should look something like this
Long-standing members at 20/02/2012
50+years
mem no date joined name
432 21/07/1963 Xerxes Smith
3103 20/02/1968 Aloysius Baker
40+years
mem no. date joined name
4934 21/02/1968 Hermione Turner
0123 08/06/1975 Bartholomew Wright
1498 08/06/1975 Ermintrude Wright
30+years
How should I approach this program?
Should I create template for storing 3 types of data or multidimensional array or by creating objects from classes?
One member is logically one object that holds all information about that member. Those objects are easy to store in a container. You would have an awful mess to handle, if you would have info in five containers.
I'm not sure what you mean by "template" and how that differs from a "class".
Start by defining class Member (or struct Member -- same thing with different accessibility).