The Florida Dental Association needs a program to record what teeth the members of Florida families have. Different Floridians have different numbers of different types of teeth (the program must use this simplified categorization of types of teeth):

The program must record the teeth for one Florida family. When it starts the program asks how many people there are in the family (maximally 6), then for each family member gets their name, a string of tooth types (each character in the string represents one tooth) for the uppers (maximally 8 teeth including missing teeth), and a string a tooth types for the lowers (maximally 8 teeth including missing teeth), e.g., the string "BMIIBBM" would represent 7 teeth (of which two are missing). The names are recorded in an array of strings. The tooth information is recorded in a three dimensional array of characters, where each plane corresponds to a person, there are two rows (uppers and lowers), and each row has a column for each tooth. Once the information is recorded the program must offer a menu of four options:
  1. Print the family's teeth record.
  2. Extract a tooth (with a check that there is something there to remove).
  3. Report the family's root canal indices, which are the roots of the quadratic equation Ix2 + Bx - M, where I, B, and M are the family's numbers of those types of teeth.
  4. Exit (with a smile)
The program must be reasonably idiot proof:

Here's what a sample run should look like (with the keyboard input shown in italics) ...

Welcome to the Floridian Tooth Records
--------------------------------------
Please enter number of people in the family : -3
Invalid number of people, try again         : 7
Invalid number of people, try again         : 3
Please enter the name for family member 1   : Henrietta
Please enter the uppers for Henrietta       : ABCDEFGH
Invalid teeth types, try again              : IIIBMBIIIMBBMIII
Too many teeth, try again                   : BMBIMBM
Please enter the lowers for Henrietta       : BBMIIMBB
Please enter the name for family member 2   : Stanley
Please enter the uppers for Stanley         : miim
Please enter the lowers for Stanley         : bbMMbb
Please enter the name for family member 3   : Raul
Please enter the uppers for Raul            : BBIbbbB
Please enter the lowers for Raul            : bbiIIBB

(P)rint, (E)xtract, (R)oot, e(X)it          : T
Invalid menu option, try again              : p

Henrietta
  Uppers:  1:B  2:M  3:B  4:I  5:M  7:B  7:M
  Lowers:  1:B  2:B  3:M  4:I  5:I  6:M  7:B  8:B
Stanley
  Uppers:  1:M  2:I  3:I  4:M
  Lowers:  1:B  2:B  3:M  4:M  5:B  6:B
Raul
  Uppers:  1:B  2:B  3:I  4:B  5:B  6:B  7:B
  Lowers:  1:B  2:B  3:I  4:I  5:I  6:B  7:B

(P)rint, (E)xtract, (R)oot, e(X)it          : E
Which family member                         : Melanie
Invalid family member, try again            : stanley
Which tooth layer (U)pper or (L)ower        : M
Invalid layer, try again                    : u
Which tooth number                          : 27
Invalid tooth number, try again             : 4
Missing tooth, try again                    : 2

(P)rint, (E)xtract, (R)oot, e(X)it          : P

Henrietta
  Uppers:  1:B  2:M  3:B  4:I  5:M  7:B  7:M
  Lowers:  1:B  2:B  3:M  4:I  5:I  6:M  7:B  8:B
Stanley
  Uppers:  1:M  2:M  3:I  4:M
  Lowers:  1:B  2:B  3:M  4:M  5:B  6:B
Raul
  Uppers:  1:B  2:B  3:I  4:B  5:B  6:B  7:B
  Lowers:  1:B  2:B  3:I  4:I  5:I  6:B  7:B

(P)rint, (E)xtract, (R)oot, e(X)it          : R
One root canal at     0.41
Another root canal at -3.04

(P)rint, (E)xtract, (R)oot, e(X)it          : X

Exiting the Floridian Tooth Records :-)

You must ...

The project is due at the start of your lab session in the week starting 28th October. You must: submit in Blackboard:

Your project is worth 15% of the course grade. It will be assessed using this marking scheme.

Please review the policies on assessment in the administration document.

Answer