I've been working at this problem for about a week and can't seem to make any progress (positive progress, that is). I really want to do well in my C class so any help would be appreciated.
Write a program that acts as a simple database of NAMES and
Social Security Numbers. The NAME, SS# and AGE are entered using
a command at the prompt. The average Age of the Names in the
Database can be obtained by a command.
1) Your program must compile without errors Using the
regular C compiler.
2) Name and Social security an Age should be stored in
an array of pointers to string. Each pointer will point
to a ":" separated string containing the the name , SSN# and
age, For example one entry can be :Ernest montrose:111-12-3245:58:
3) Duplicate SS# are not allowed.
4) The database should be able to hold 100 entries and
must deal gracefully with the case of a full database.
5) Must be able to add and remove entries from the DB.
6) Must be able to display the content of the DB.
7) All entry must be in lower case, except the first letter
of the first name and last name.
8) Add your own requirements for extra credit ( Be sure to
tell me what they are ).
At the prompt the following commands are recognized:
ADDN <firstname lastname> ( Add a name )
ADDS <SS#> ( Add sociall security to a name )
ADDA <age> (Add the age )
RM <name or SSN#> ( Remove an entry by name or by social
security must handle Duplicate names here )
DISP [name] [SSN#] [AVERAGE] (display data by name or by social
security. With no argument
to DISP it displays the whole database.
With AVERAGE as an argument it displays
the average age for the people in the
Q (Quits the program)
RESTRICTIONS and CONSTRAINTS:
Once one of the Commands ADDS, ADDN, ADDA is done the other two
must follow!! Your program must enforce this so that the data
is packaged properly before it is stuffed in the database table.
Notice that there is no restriction on the order in which these
three commands are issued. You also must make sure that once
one of the three is issued it cannot be reissued if it was